-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Py_DEPRECATED() macro for Visual Studio #77588
Comments
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 """
#ifdef __GNUC__
#define DEPRECATED(func) func __attribute__ ((deprecated))
#elif defined(_MSC_VER)
#define DEPRECATED(func) __declspec(deprecated) func
#else
#pragma message("WARNING: You need to implement DEPRECATED for this compiler")
#define DEPRECATED(func) func
#endif
""" Moreover, is Py_DEPRECATED() defined on clang which also supports the deprecated function attribute? Current Include/pyport.h code: #if defined(__GNUC__) \
&& ((__GNUC__ >= 4) || (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
#else
#define Py_DEPRECATED(VERSION_UNUSED)
#endif |
Oh, bpo-19569 is still open, for Visual Studio see: |
In Arrow we use the following: #if __cplusplus <= 201103L
# ifdef __GNUC__
# define ARROW_DEPRECATED(...) __attribute__((deprecated(__VA_ARGS__)))
# elif defined(_MSC_VER)
# define ARROW_DEPRECATED(...) __declspec(deprecated(__VA_ARGS__))
# else
# define ARROW_DEPRECATED(...)
# endif
#else
# define ARROW_DEPRECATED(...) [[deprecated(__VA_ARGS__)]]
#endif |
Thanks Zackery Spytz for the fix! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: