You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement Py_DEPRECATED() macro for Visual Studio #77588
"""
#ifdef__GNUC__#defineDEPRECATED(func) func __attribute__ ((deprecated))
#elif defined(_MSC_VER)
#defineDEPRECATED(func) __declspec(deprecated) func
#else#pragma message("WARNING: You need to implement DEPRECATED for this compiler")
#defineDEPRECATED(func) func
#endif"""
Activity
vstinner commentedon May 2, 2018
According to the following links, it would be possible to implement the Pc_DEPRECATED() macro for Visual Studio:
https://mail.python.org/pipermail/python-dev/2018-May/153299.html
https://stackoverflow.com/questions/295120/c-mark-as-deprecated/295229#295229
Moreover, is Py_DEPRECATED() defined on clang which also supports the deprecated function attribute?
https://clang.llvm.org/docs/AttributeReference.html#deprecated-gnu-deprecated
Current Include/pyport.h code:
vstinner commentedon May 2, 2018
Oh, bpo-19569 is still open, for Visual Studio see:
https://bugs.python.org/issue19569#msg227727
pitrou commentedon May 2, 2018
In Arrow we use the following:
vstinner commentedon May 28, 2019
New changeset 3c8724f by Victor Stinner (Zackery Spytz) in branch 'master':
bpo-33407: Implement Py_DEPRECATED() on MSVC (GH-8980)
3c8724f
vstinner commentedon May 28, 2019
Thanks Zackery Spytz for the fix!