This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.snow
Recipients eric.snow, kumaraditya, lazka, serhiy.storchaka, vstinner
Date 2022-02-11.16:29:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CALFfu7CqB1oYMqnkPcb=oA6hTg05BqLQ=Ho0xbDKCwqpJovt7Q@mail.gmail.com>
In-reply-to <1644568585.0.0.541114039344.issue46541@roundup.psfhosted.org>
Content
On Fri, Feb 11, 2022 at 1:36 AM Christoph Reiter <report@bugs.python.org> wrote:
> Sorry if off topic, but I noticed that CPython doesn't deprecate macros in code, while with gcc/clang it's possible to show compiler warnings for them using some pragma magic:
> [snip]
> Maybe that makes getting rid of them easier in the long run?

That's a good question.  We do have Py_DEPRECATED() (in
Include/pyport.h), which is used for symbols.  I'm not sure anyone has
given much thought to deprecating macros, but it's probably worth
considering.  I recommend that you post something about this to
python-dev@python.org.

FWIW, here are other explanations of how to deprecate macros:

* https://stackoverflow.com/questions/57478368/what-is-the-best-way-to-mark-macro-as-deprecated/57479189#57479189
* https://stackoverflow.com/questions/2681259/how-to-deprecate-a-c-pre-processor-macro-in-gcc/29297970#29297970
History
Date User Action Args
2022-02-11 16:29:50eric.snowsetrecipients: + eric.snow, vstinner, serhiy.storchaka, lazka, kumaraditya
2022-02-11 16:29:50eric.snowlinkissue46541 messages
2022-02-11 16:29:49eric.snowcreate