Questions tagged [deprecated]

Deprecation is a status applied to software features or language terms to indicate that they should be avoided, typically because they have been superseded. Use this tag for questions about deprecated features or how to deprecate features yourself (e.g. using annotations).

In the process of authoring computer software, its standards or documentation, deprecation is a status applied to software features to indicate that they should be avoided, typically because they have been superseded. Although deprecated features remain in the software, their use may raise warning messages recommending alternative practices, and deprecation may indicate that the feature will be removed in the future.

Features are deprecated—rather than immediately removed—in order to provide backward compatibility and give programmers who have used the feature time to bring their code into compliance with the new standard.

2508 questions
79
votes
2 answers

DatatypeContexts Deprecated in Latest GHC: Why?

I was just doing some Haskell development and I recompiled some old code on a new version of GHC: The Glorious Glasgow Haskell Compilation System, version 7.2.1 And when I did I received the following error: Warning: -XDatatypeContexts is…
Robert Massaioli
  • 13,379
  • 7
  • 57
  • 73
78
votes
2 answers

React 16.7 - React.SFC is now deprecated

I use to declare stateless components like this: const example: React.SFC = ({propsType}) => (); However the SFC is now deprecated, maybe this twitter post from Dan Abramov explains why. What should we use now that SFC is deprecated?
Jonas Praem
  • 2,296
  • 5
  • 32
  • 53
76
votes
7 answers

AmazonS3Client(credentials) is deprecated

I'm trying to read the files available on Amazon S3, as the question explains the problem. I couldn't find an alternative call for the deprecated constructor. Here's the code: private String AccessKeyID = "xxxxxxxxxxxxxxxxxxxx"; private String…
Asif Ali
  • 1,422
  • 2
  • 12
  • 28
76
votes
4 answers

Display classes containing deprecation Android Studio

I updated my project to the latest Android APIs and the project now has multiple deprecated methods. Does Android Studio have a cool way of listing all classes containing said methods, such as the TODO window? I know I can go through every class and…
hopeman
  • 2,778
  • 3
  • 18
  • 33
76
votes
5 answers

OnGlobalLayoutListener: deprecation and compatibility

I have to use an OnGlobalLayoutListener object and then to remove the listener, I had a problem with deprecated methods that I resolve with following code. protected void onCreate(Bundle savedInstanceState) { final LinearLayout llTotal =…
crbin1
  • 2,219
  • 3
  • 22
  • 29
74
votes
11 answers

fopen deprecated warning

With the Visual Studio 2005 C++ compiler, I get the following warning when my code uses the fopen() and such calls: 1>foo.cpp(5) : warning C4996: 'fopen' was declared deprecated 1> c:\program files\microsoft visual studio…
Ashwin Nanjappa
  • 76,204
  • 83
  • 211
  • 292
72
votes
3 answers

What is so bad about GL_QUADS?

I hear that GL_QUADS are going to be removed in the OpenGL versions > 3.0, why is that? Will my old programs not work in the future then? I have benchmarked, and GL_TRIANGLES or GL_QUADS have no difference in render speed (might even be that…
Rookie
  • 3,753
  • 5
  • 33
  • 33
72
votes
12 answers

How can I replace the deprecated set_magic_quotes_runtime in php?

I'm getting this message when I try to run a php script I have to use but did not write. Deprecated: Function set_magic_quotes_runtime() is deprecated in /opt/lampp/htdocs/webEchange/SiteWeb_V5/inc/fpdf.php on line 1810 Here is line…
Shawn
  • 10,931
  • 18
  • 81
  • 126
68
votes
2 answers

In VB.NET, can I mark a function as deprecated?

Is there an ability in VB.NET to deprecate code? I know that in C# there are 'attributes', and tags in java; is there anything similar in VB.NET, other than leaving a 'todo:...?
brasskazoo
  • 76,030
  • 23
  • 64
  • 76
67
votes
6 answers

androidx.test.InstrumentationRegistry is deprecated

Switched to AndroidX and received deprecated: import androidx.test.InstrumentationRegistry. If I made next import: import androidx.test.platform.app.InstrumentationRegistry I can't use getContext(). Ex: val context =…
Morozov
  • 4,968
  • 6
  • 39
  • 70
67
votes
6 answers

What is the purpose of subclassing the class "object" in Python?

All the Python built-ins are subclasses of object and I come across many user-defined classes which are too. Why? What is the purpose of the class object? It's just an empty class, right?
ignoramus
65
votes
1 answer

PhpStorm find all deprecated usages in the project

I'm working now on a pretty big PHP-project and I want to upgrade Symfony framework to the next version. Before I do that, I want to be sure that there are no deprecated method usages left in the project. Is there handy way to find all deprecated…
alexey_detr
  • 1,640
  • 1
  • 17
  • 15
64
votes
5 answers

Deprecated meaning?

When jQuery, Microsoft or some other software company says:"this function is deprecated". For example, when there is a func1 that works fine in version 1.0 and is deprecated in version 2.0 that also introduces a new func2: Should func1 also be…
Royi Namir
  • 144,742
  • 138
  • 468
  • 792
64
votes
1 answer

Deprecation status of the NumPy matrix class

What is the status of the matrix class in NumPy? I keep being told that I should use the ndarray class instead. Is it worth/safe using the matrix class in new code I write? I don't understand why I should use ndarrays instead.
62
votes
4 answers

Swift 5.0: 'withUnsafeBytes' is deprecated: use `withUnsafeBytes(...)

I previously used this code in Swift 4.2 to generate an id: public static func generateId() throws -> UInt32 { let data: Data = try random(bytes: 4) let value: UInt32 = data.withUnsafeBytes { $0.pointee } // deprecated warning! return…
Baran
  • 2,710
  • 1
  • 23
  • 23