Re: [Python-Dev] introduction of __attribute__(deprecated) ?

2019-03-24 Thread Stéphane Wirtel
Thanks Victor, I have updated my PR with the Py_DEPRECATED macro. Le 24/03/19 à 23:07, Victor Stinner a écrit : > Le dim. 24 mars 2019 à 20:56, Stéphane Wirtel a écrit : >> So my question is, can we use/add __attribute__(deprecated) in our >> "development" kit? > > There is already

Re: [Python-Dev] introduction of __attribute__(deprecated) ?

2019-03-24 Thread Victor Stinner
Le dim. 24 mars 2019 à 20:56, Stéphane Wirtel a écrit : > So my question is, can we use/add __attribute__(deprecated) in our > "development" kit? There is already Py_DEPRECATED(VERSION_UNUSED) macro which uses __attribute__((__deprecated__)) on GCC >= 3.1. You can find the doc of a few macros

Re: [Python-Dev] introduction of __attribute__(deprecated) ?

2019-03-24 Thread Stéphane Wirtel
And use an enumeration for the constants. For example: #include #include enum { PY_READWRITE = 0, PY_READONLY = 1, READONLY __attribute((deprecated("use PY_READONLY"))) = PY_READONLY, READWRITE __attribute((deprecated("use PY_READWRITE"))) = PY_READWRITE, }; Le 24/03/19 à

[Python-Dev] introduction of __attribute__(deprecated) ?

2019-03-24 Thread Stéphane Wirtel
Hi, I have created the issue https://bugs.python.org/issue36347 because I wanted to add a missing macro for the PyMemberDef.flags attribute. In the Modules/*.c files, we can find descriptions with PyMemberDef where the access flag has the 0 value. Example: static PyMemberDef members[] = {