osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] Process to remove a Python feature


On Wed, 2 May 2018 11:11:16 +0200
Victor Stinner <vstinner at redhat.com> wrote:
> 
> Removing a feature from the C API is more complex, since there is no
> portable way to emit a deprecation warning at compilation. There is
> Py_DEPRECATED() which seems to only be available on GCC (3.1 and
> newer).

It's at least possible with gcc, clang and MSVC:
https://stackoverflow.com/questions/295120/c-mark-as-deprecated/295229#295229

You can even add a deprecation message.

Regards

Antoine.