Questions tagged [deprecation-warning]

A deprecation warning indicates that a method is obsolete. Using a newer method (which has been provided in the meanwhile) is preferred.

A deprecation warning indicates that a method, property or other software feature is obsolete. Using a newer feature (which has been provided in the meanwhile) is preferred.

547 questions
10
votes
1 answer

Checking code for deprecation warnings

Consider the following sample code: data = [] try: print data[0] except IndexError as error: print error.message There is nothing syntactically wrong (using Python2.7) with the code except that if you run python with warnings turned on,…
alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
10
votes
2 answers

DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 exception.__class__, exception.message,

Can anyone tell me the actual reason behind the warning I am getting in this Django middleware, and how can I solve this? I am getting this message "DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 exception.class,…
PythonDev
  • 4,287
  • 6
  • 32
  • 39
9
votes
2 answers

How to silence EllipticCurvePublicNumbers.encode_point CryptographyDeprecationWarning when using Paramiko in Python

CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding.
Rajesh s
  • 175
  • 1
  • 8
9
votes
2 answers

How do I get IntelliJ to display the Scala compilation deprecation warnings

In IntelliJ (version: 2016.3.1, Scala Plugin version: 2016.3.5), I have a Scala 2.12 (which implies Java 1.8 being required) project where I am selecting "Build/Rebuild Project". I am receiving the following output in the "Messages"…
chaotic3quilibrium
  • 5,661
  • 8
  • 53
  • 86
9
votes
3 answers

How to mark a class as Deprecated in Ruby?

In Ruby (and even more so: Rails) it is easy to mark methods as deprecated. But how can I mark an entire class as deprecated? I want to raise a warning whenever a class is used: class BillingMethod end BillingMethod.new #=> DEPRECATION WARNING: the…
berkes
  • 26,996
  • 27
  • 115
  • 206
9
votes
2 answers

Verbose deprecation warnings in Django

After upgrading from django 1.3 to django 1.5 I started to see these DeprecationWarnings during the test run: path_to_virtualenv/lib/python2.6/site-packages/django/http/request.py:193: DeprecationWarning: HttpRequest.raw_post_data has been…
alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
8
votes
2 answers

Is aws datapipeline service being deprecated?

When I navigate to aws datapipeline console it shows this banner, Please note that Data Pipeline service is in maintenance mode and we are not planning to expand the service to new regions. We plan to remove console access by 02/28/2023. Will aws…
8
votes
3 answers

DEPRECATION Error : 'wheel' package is not installed

We are getting following deprecation error while trying to deploy python code. We are using python 3.7.12. We have tried to install wheel package as the part of deployment with no luck. Do we need to mention any specific version of wheel -- Would…
Partha
  • 413
  • 2
  • 5
  • 16
8
votes
1 answer

startActivityForResult is deprecated, I'm trying to update my code

i'm new to android. just trying to make a webview app instead of an actual mobile app, then i'll use my flask app as a mobile app. the app works fine as it is, no problems at all but startActivityForResult is giving me a warning. here's the code: …
knts
  • 103
  • 1
  • 2
  • 6
8
votes
1 answer

Passing strings for MessageEmbed#setFooter is deprecated

I'm getting this warning in the terminal when running my bot code: (node:6220) DeprecationWarning: Passing strings for MessageEmbed#setFooter is deprecated. Pass a sole object instead.(Use node --trace-deprecation ... to show where the warning was…
4hm3d
  • 83
  • 1
  • 1
  • 5
8
votes
0 answers

How can I create a deep clone without using 'BinaryFormatter'?

I have a bit of C# code which I use for performing a deep copy of an object: public static T Copy(T objectToCopy) { T result = default(T); using (var memoryStream = new MemoryStream()) { var formatter…
Fabricio Rodriguez
  • 3,769
  • 11
  • 48
  • 101
8
votes
1 answer

Why does Visual Studio not consider Obsolete("message") to be a warning?

I've noticed a variation in how Visual Studio handles the use of code marked with the ObsoleteAttribute. Assume some code calls a method that is marked with this attribute. If the attribute was applied like this: [Obsolete] void Foo() { ... } then…
StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
8
votes
1 answer

Disable deprecation in javascript console

I'm using a library from another person but it's probably pretty old and, even though it works just fine, I get a DEP066 deprecation error in my console when I run it. I'm a COMPLETE noob when talking about javascript so I need your help. Is there a…
8
votes
4 answers

Symfony 3.4: How to get a list of all Deprecated warnings?

I have quite a big project in Symfony 3.4 and I wish to update to Symfony 4. And I get a lot of deprecation warnings. Which is ok I need to fix those, but I cant check each route for my site... there is too many. Is there a way to get all the…
NaGeL182
  • 894
  • 1
  • 13
  • 35
8
votes
3 answers

Deprecating fields in django model

I'm normalizing a database associated with a Django project and will be moving fields to different tables. As part of the implementation process, I'd like to throw a deprecation warning to my colleagues if they attempt to use the old attributes…