Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue33407

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Implement Py_DEPRECATED() macro for Visual Studio
Type:Stage:resolved
Components:WindowsVersions:Python 3.8
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: ZackerySpytz, paul.moore, pitrou, steve.dower, tim.golden, vstinner, zach.ware
Priority:normalKeywords:patch

Created on2018-05-02 09:29 byvstinner, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 8980mergedZackerySpytz,2018-08-28 22:09
Messages (5)
msg316059 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2018-05-02 09:29
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.htmlhttps://stackoverflow.com/questions/295120/c-mark-as-deprecated/295229#295229"""#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?https://clang.llvm.org/docs/AttributeReference.html#deprecated-gnu-deprecatedCurrentInclude/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
msg316060 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2018-05-02 09:31
Oh,bpo-19569 is still open, for Visual Studio see:https://bugs.python.org/issue19569#msg227727
msg316061 -(view)Author: Antoine Pitrou (pitrou)*(Python committer)Date: 2018-05-02 09:35
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
msg343789 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2019-05-28 15:16
New changeset3c8724fc60163f4f3c3b0d531c84cc7b36783f82 by Victor Stinner (Zackery Spytz) in branch 'master':bpo-33407: Implement Py_DEPRECATED() on MSVC (GH-8980)https://github.com/python/cpython/commit/3c8724fc60163f4f3c3b0d531c84cc7b36783f82
msg343790 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2019-05-28 15:19
Thanks Zackery Spytz for the fix!
History
DateUserActionArgs
2022-04-11 14:59:00adminsetgithub: 77588
2019-05-28 15:19:44vstinnersetstatus: open -> closed
resolution: fixed
messages: +msg343790

stage: patch review -> resolved
2019-05-28 15:16:56vstinnersetmessages: +msg343789
2018-08-28 22:26:43ZackerySpytzsetnosy: +ZackerySpytz
2018-08-28 22:09:42ZackerySpytzsetkeywords: +patch
stage: patch review
pull_requests: +pull_request8454
2018-05-02 09:35:26pitrousetmessages: +msg316061
2018-05-02 09:31:41vstinnersetmessages: +msg316060
2018-05-02 09:29:49vstinnercreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp