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
37
votes
4 answers

Hibernate - AnnotationConfiguration deprecated

I am using Hibernate in version 3.6.0 and the AnnotationConfiguration is marked as deprecated. Here is the the line in my HibernateUtil.java class: sessionFactory = new…
Tim
  • 13,228
  • 36
  • 108
  • 159
37
votes
5 answers

Devise token_authenticatable deprecated, what is the alternative?

I have been using token_authenticatable before to secure my API, however, I have found that it was deprecated? What should I use instead and why did they deprecate it?
harinsa
  • 3,176
  • 5
  • 33
  • 53
37
votes
9 answers

Replacement for

This has been asked before by other people, but I've never seen an adequate answer. Is there a valid replacement to the
tag? I know there's margin: 0 auto;, but that requires setting a width. There's also align="center", but I believe that…
JacobTheDev
  • 17,318
  • 25
  • 95
  • 158
36
votes
3 answers

Alternative to contextlib.nested with variable number of context managers

We have code that invokes a variable number of context managers depending on runtime parameters: from contextlib import nested, contextmanager @contextmanager def my_context(arg): print("entering", arg) try: yield arg finally: …
ecatmur
  • 152,476
  • 27
  • 293
  • 366
35
votes
2 answers

Can I mark a function as deprecated in Scala?

I'd like Scala compiler to show a deprecation warning whenever a particular function is found used. How can I achieve this?
Ivan
  • 63,011
  • 101
  • 250
  • 382
35
votes
9 answers

The plugins `XXXXX` use a deprecated version of the Android embedding

i was trying to get my dependences using pub get, but i keep getting a bunch off errors. And i'm stuck in these error. I have tried flutter clean, flutter upgrade and flutter doctor without any issue. Then i tried flutter pub cache repair witch…
Soto-kun
  • 371
  • 1
  • 3
  • 7
35
votes
2 answers

Why Xcode does not show index options for CoreData entities and attributes?

In Xcode 9 (beta 6) indexing options are missing in Data Model Inspector (.xcdatamodeld file): They are visible in Xcode 8: Do you know what reasons are behind this decision?
Trzy Gracje
  • 2,969
  • 4
  • 20
  • 24
35
votes
3 answers

Where can I find a good online OpenGL 3.0 tutorial that doesn't use any deprecated functionality?

I just purchased the fifth edition of the OpenGL SuperBible. I'm very pleased that they've avoided using deprecated functionality but their examples make use of GLTools. GLTools provides a slew of useful functions for rendering simple 3D objects and…
Jonba
  • 1,117
  • 2
  • 11
  • 12
35
votes
8 answers

How to get MIME type of a file in PHP 5.5?

I am using mime_content_type() in PHP 5.5 to get a MIME type, but it throws fatal: error function not found. How can I achieve this on PHP 5.5?
Jitendra Yadav
  • 896
  • 1
  • 6
  • 14
34
votes
2 answers

What are all these deprecated "loop" parameters in asyncio?

A lot of the functions in asyncio have deprecated loop parameters, scheduled to be removed in Python 3.10. Examples include as_completed(), sleep(), and wait(). I'm looking for some historical context on these parameters and their removal. What…
Maxpm
  • 24,113
  • 33
  • 111
  • 170
34
votes
6 answers

Function ereg_replace() is deprecated - How to clear this bug?

I have written following PHP code: $input="menu=1&type=0&"; print $input."
".ereg_replace('/&/', ':::', $input); After running above code, it gives following warning, Deprecated: Function ereg_replace() is deprecated How can I resolve this…
Pradip
  • 1,317
  • 4
  • 21
  • 36
34
votes
3 answers

error: strcpy was not declared in this scope

I get this problem in a c++ problem compiling in Ubuntu g++ version 4.4.3. I dont know the headers to include to solve this problem.. Thanks centro_medico.cpp: In constructor ‘Centro_medico::Centro_medico(char*, char*, int, int,…
Chak
  • 361
  • 1
  • 3
  • 6
33
votes
3 answers

How can I mark a property as deprecated in delphi?

I want to mark a property in Delphi as deprecated for removal later. According to the Delphi documentation deprecated may be appended to any declaration, but it's not working for properties. Is there a way to do this? This is what I tried: property…
Trellmor
  • 634
  • 1
  • 7
  • 15
33
votes
7 answers

Swift 4 'substring(from:)' is deprecated: Please use String slicing subscript with a 'partial range from' operator

i've just converted my little app but i've found this error: 'substring(from:)' is deprecated: Please use String slicing subscript with a 'partial range from' operator my code is: let dateObj = dateFormatterFrom.date(from: dateStringa) if…
Raffaele Spadaro
  • 331
  • 1
  • 3
  • 3
33
votes
4 answers

What is the reason for `std::result_of` deprecated in C++17?

I saw std::result_of is being deprecated in C++17. What is the reason for std::result_of deprecated in C++17? Also I would like to know the difference between std::result_of and std::invoke_result.
msc
  • 33,420
  • 29
  • 119
  • 214