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
23
votes
1 answer

Mark protocol method as deprecated

How do I make a protocol method appear as deprecated for someone implementing the protocol? I've tried using @available as shown below, but there is no warning shown in Xcode when implementing the protocol method. protocol TestDelegate { …
Adam Johns
  • 35,397
  • 25
  • 123
  • 176
21
votes
2 answers

Replacement for deprecated MediaQueryList.addListener() method

The Mozilla Developers Network docs say MediaQueryList.addListener() is deprecated. Though it's working in my (Angular 8) code, the linting in VS Code is warning about deprecation. What's the replacement for MediaQueryList.addListener()?
Chaitanya
  • 847
  • 1
  • 8
  • 15
20
votes
3 answers

Should JavaScript libraries use the deprecated annotation?

Obviously it's up to the developers as to when to deprecate and when to remove, but I'm wondering how to warn developers that a JavaScript function has been deprecated? Some popular languages (Java, C#, Python) support language level deprecation in…
hafichuk
  • 10,351
  • 10
  • 38
  • 53
19
votes
1 answer

How to fix DEPRECATION WARNING: Class level methods will no longer inherit scoping from in Rails 6.1?

Recently updated my Rails app to 6.0. When I run my tests I get the following deprecation warning from a scope on my Referral model: DEPRECATION WARNING: Class level methods will no longer inherit scoping from `with_all_final_state_fulfillments` in…
19
votes
2 answers

JMeter Warning: Nashorn engine is planned to be removed from a future JDK release

When I run JMeter 5.1.1 recently downloaded, I see many times in terminal window: Warning: Nashorn engine is planned to be removed from a future JDK release I've used web search and found JEP 335: Deprecate the Nashorn JavaScript…
Alex Martian
  • 3,423
  • 7
  • 36
  • 71
19
votes
2 answers

SyntaxError: 'with' statements are not valid in strict mode

I'm getting this error in safari console when I try to do anything from a breakpoint. Bug report here: https://bugs.webkit.org/show_bug.cgi?id=83267 Does anyone have a workaround? For reasons that I am assuming are related to this javascript has…
quinn
  • 5,508
  • 10
  • 34
  • 54
18
votes
6 answers

How to fix Mongoose deprecation warning about "strictQuery"

When I start build my backend server, I get this deprecation warning, but it's showing that I'm connected to the database. File server.js const dotenv = require('dotenv'); const mongoose = require('mongoose'); const app =…
DummyData1590
  • 181
  • 1
  • 1
  • 5
18
votes
2 answers

How to implement deprecation in python with argument alias

We are developing a python library and would like to change the way some function arguments are named in some functions. We would like to keep backward compatibility and thus we would like to find a way to create alias for function arguments. Here…
Jonathan DEKHTIAR
  • 3,456
  • 1
  • 21
  • 42
17
votes
1 answer

'init(destination:isActive:label:)' was deprecated in iOS 16.0: use NavigationLink(value:label:) inside a NavigationStack or NavigationSplitView

I have tried different iterations of examples posted on this site but nothing is going right. I have also tried following the examples listed here: Navigation to new navigation types: I am getting the warning in this posts' title for deprecation of…
LizG
  • 2,246
  • 1
  • 23
  • 38
17
votes
4 answers

Rails 5.1.1 deprecation warning changed_attributes

I've just upgraded from Rails 5.0.0 to 5.1.1 and started getting a ton of deprecation warnings like this: DEPRECATION WARNING: The behavior of changed_attributes inside of after callbacks will be changing in the next version of Rails. The new …
Almaron
  • 4,127
  • 6
  • 26
  • 48
16
votes
4 answers

Symfony 5.1 Deprecation RouteCollectionBuilder -> RoutingConfigurator

I am updating a Symfony project from 5.0 to 5.1 There is this one deprecation hint saying RouteCollectionBuilder is deprecated and RoutingConfigurator should be used instead. The exact message is Since symfony/routing 5.1: The …
user3440145
  • 793
  • 10
  • 34
16
votes
3 answers

Deprecated constructor for BigDecimal.setScale(int, int) and RoundingMode enums

I'm trying to specify the precision of a BigDecimal value with the following: new BigDecimal(12.99).setScale(2, BigDecimal.ROUND_HALF_EVEN. However, the compiler is telling me that setScale(int, int) is deprecated. When I've tried to use the…
BenjaminJC
  • 307
  • 1
  • 3
  • 9
16
votes
5 answers

Python/matplotlib : getting rid of matplotlib.mpl warning

I am using matplotlib using python 3.4. When I start my program, I have the following warning message: C:\Python34-32bits\lib\site-packages\matplotlib\cbook.py:123: MatplotlibDeprecationWarning: The matplotlib.mpl module was deprecated in…
Vince
  • 3,979
  • 10
  • 41
  • 69
15
votes
3 answers

androidx getFragmentManager() has been deprecated

Getting deprecation warnings for androidx.fragment.app.Fragment: warning: [deprecation] getFragmentManager() in Fragment has been deprecated. What to do?
15
votes
3 answers

python warnings.filterwarnings does not ignore DeprecationWarning from 'import sklearn.ensemble'

I am trying to silence the DeprecationWarning with the following method. import warnings warnings.filterwarnings(action='ignore') from sklearn.ensemble import RandomForestRegressor However, it still shows: DeprecationWarning:…
1 2
3
36 37