On Tue, May 31, 2022 at 2:35 PM Matthias Bussonnier <bussonniermatthias@gmail.com> wrote:
Isn't that what PendingDeprecationWarning is for ?

No it isn't, PendingDeprecationWarning means "we're planning to deprecate it", which is definitely not the same as "we're keeping it, but there's a better alternative now". Also, it emits a warning which means that other projects with policies like SciPy need to deal with it immediately, which is bad.
 
Cheers,
Ralf



> Base class for warnings about features which are obsolete and expected to be deprecated in the future, but are not deprecated at the moment [1]

I think it's underused.
The Main difference with DeprecationWarning being that
DeprecationWarning is not ignored in __main__ but PendingDW is.

--
M

[1] : from https://docs.python.org/3/library/exceptions.html#PendingDeprecationWarning

On Tue, 31 May 2022 at 14:28, Ralf Gommers <ralf.gommers@gmail.com> wrote:
>
> Hi all,
>
> We've got a number of (sets of) APIs that we keep around for backwards compatibility reasons, but that are not recommended to use in new code. The way we mark those APIs varies, and often it's not exactly clear that they shouldn't be used.
>
> Examples of legacy APIs:
> 1. `scipy.fftpack`
> 2. the functional interface to FITPACK (see, e.g., the Notes section of http://scipy.github.io/devdocs/reference/generated/scipy.interpolate.splev.html)
>
> What do you think about adding a formal API status "legacy", and having a uniform way of marking such APIs? That could be for example a `.. legacy::` reST directive that gives a warning box near the top of the docs.
>
> The benefits would be (a) that it's clearer to end users that there is a better alternative, (b) it's clearer to other projects that they should not copy these APIs (thinking of CuPy, Dask, etc. here), and (c) there is a good intermediate state between "supported" and "deprecated" so that if we're not in agreement on the cost of a deprecation, we can move something to "legacy" instead rather than do nothing.
>
> Thoughts?
>
> Cheers,
> Ralf
>
>
> _______________________________________________
> SciPy-Dev mailing list -- scipy-dev@python.org
> To unsubscribe send an email to scipy-dev-leave@python.org
> https://mail.python.org/mailman3/lists/scipy-dev.python.org/
> Member address: bussonniermatthias@gmail.com
_______________________________________________
SciPy-Dev mailing list -- scipy-dev@python.org
To unsubscribe send an email to scipy-dev-leave@python.org
https://mail.python.org/mailman3/lists/scipy-dev.python.org/
Member address: ralf.gommers@gmail.com