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
6
votes
2 answers

Can a concept be declared deprecated?

I just encountered a case where I wanted to declare a C++ 20 concept deprecated. However it seems like my compiler (Apple Clang 14) does not accept adding a [[deprecated]] attribute to a concept. My attempt looked like template concept…
PluginPenguin
  • 1,576
  • 11
  • 25
6
votes
1 answer

quantityType(forIdentifier:) deprecated in a future version of iOS?

Xcode (I'm on v13.1) warns me, that quantityType(forIdentifier:) will be deprecated in a future version of iOS. I thus checked in Apple's developer documentation for a hint what else to use. Surprisingly, on the documentation it is not labeled as…
Leo
  • 1,508
  • 13
  • 27
6
votes
2 answers

IntelliJ "Deprecated Gradle features" - how to reproduce on command line?

When I reload my Gradle Project in IntelliJ, I get the following output: Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. Use '--warning-mode all' to show the individual deprecation warnings. See…
Adam Millerchip
  • 20,844
  • 5
  • 51
  • 74
6
votes
1 answer

Zeitwerk "DEPRECATION WARNING: Initialization autoloaded the constants" caused by including a module in the lib folder

DEPRECATION WARNING: Initialization autoloaded the constants AuthHelper, SemanticFormHelper, ActionText::ContentHelper, and ActionText::TagHelper Since upgrading to Rails 6 I have been getting this warning relating to the new Zeitwerk…
markv12
  • 334
  • 1
  • 11
6
votes
3 answers

Python deprecation warning about sum function

I coded an algorithm and it worked properly till 2 weeks ago. I get this warning and I cannot understand why I get it. The warning is: "C:/Users/Administrator/Documents/Python/sezg_1_diffne.py:147: DeprecationWarning: Calling np.sum(generator) is…
6
votes
1 answer

Matplotlib - MatplotlibDeprecationWarning

I have made a program, that makes a random walk and plots it. And it works perfectly, but I get a warning every time I run the program. It says: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently…
Laurits L. L.
  • 417
  • 1
  • 4
  • 15
6
votes
3 answers

Java Deprecated APIs and SuppressWarnings "deprecation" - practical approach

I have seen many examples of using the Deprecated annotation on APIs in order to mark them as 'need to be replaced soon'. However, in almost all of these cases the code developers not only kept using the deprecated APIs, but also suppressed the…
Rann Lifshitz
  • 4,040
  • 4
  • 22
  • 42
6
votes
2 answers

ES modules: deprecate export

As a library mantainer, I want to deprecate an old export in favour of a new one. In order to keep backward compatibility I'd like to temporary keep both exports and warn those users who are still using the old one. Before function foo(){} export…
Andrea Carraro
  • 9,731
  • 5
  • 33
  • 57
6
votes
1 answer

Android Studio 3 not marking deprecated methods anymore

I've noticed after the update to Android Studio 3 (but it could be happened also before and I didn't noticed) that some deprecated methods are not marked any more with a line-through. For example: I'm on Ubuntu, Android Studio 3.0.1 just updated. I…
6
votes
2 answers

Unit tests for deprecated functions in R package cause warnings during check

I've deprecated several functions in my R package by including a .Deprecated("new_function_name") line at the start of the function. I had full unit test coverage for those deprecated functions. Now those tests produce warnings (because of the…
Sam Firke
  • 21,571
  • 9
  • 87
  • 105
6
votes
1 answer

Is there a way to silence Ruby's deprecation warning in 2.4.0?

Since Ruby 2.4.0, there has been a deprecation warning for using certain features that have been deprecated. For example, Bignum, Fixnum, TRUE, and FALSE will all trigger deprecation warnings. While I'm fixing my code, there is a fair amount of code…
Eli Sadoff
  • 7,173
  • 6
  • 33
  • 61
6
votes
1 answer

Why am I not seeing Numpy's DeprecationWarning?

I recently updated Python's Numpy package on one of my machines, and apparently I've been relying on a deprecated feature of numpy for a while now: >>> np.__version__ '1.10.4' >>> a = np.ones(10, dtype=np.uint16) >>> a /= 0.5 Traceback (most recent…
Andrew
  • 2,842
  • 5
  • 31
  • 49
6
votes
1 answer

Groovy Deprecated Methods and Eclipse - sort

I've got the following code which I wrote in groovy 1.8 someListOfLists.flatten().sort().unique() I've moved over to groovy 2.3.x, and eclipse (using e4.4 GroovyEclipse plugin for Juno from snapshot release) is showing me the sort() method is now…
Mark Fisher
  • 9,838
  • 3
  • 32
  • 38
6
votes
2 answers

Can @SuppressWarnings("deprecation") apply to the use of a deprecated interface without applying to the whole class?

I have some legacy code that implements a deprecated interface. This particular component will soon be deprecated and removed itself so it does not make sense to refactor to address the root cause of the compiler warning. Instead I'd like to…
cclark
  • 1,402
  • 3
  • 17
  • 25
5
votes
1 answer

getApplicationInfo(String,int) deprecated, What is the alternative?

I have upgraded targetSdkVersion and compileSdkVersion to 33. Now getting warning getApplicationInfo(String,int) is deprecated. It is suggested to use use getApplicationInfo(java.lang.String, android.content.pm.PackageManager.ApplicationInfoFlags)…