gcc -DPy_NO_DEPRECATED_API option?
I have been following the discussions on removing deprecated macros and functions from the C API. I checked my code, PyCXX and have a coupld of issues that is easy to fix. But I may have missed something.
What would help me is to be able to build extensions with all the deprecated pieces of the C API removed.
A bit like the way the limited C API works via the -DPy_LIMITED_API=0x03040000 option.
What do you think?
Barry
You use -Werror to treat compiler warnings as errors. In GCC, __attribute__((__deprecated__)) emits a compiler warning.
Victor
Le mar. 16 juin 2020 à 13:11, Barry Scott <barry@barrys-emacs.org> a écrit :
I have been following the discussions on removing deprecated macros and functions from the C API. I checked my code, PyCXX and have a coupld of issues that is easy to fix. But I may have missed something.
What would help me is to be able to build extensions with all the deprecated pieces of the C API removed.
A bit like the way the limited C API works via the -DPy_LIMITED_API=0x03040000 option.
What do you think?
Barry
capi-sig mailing list -- capi-sig@python.org To unsubscribe send an email to capi-sig-leave@python.org https://mail.python.org/mailman3/lists/capi-sig.python.org/ Member address: vstinner@python.org
-- Night gathers, and now my watch begins. It shall not end until my death.
On 16 Jun 2020, at 13:56, Victor Stinner <vstinner@python.org> wrote:
You use -Werror to treat compiler warnings as errors. In GCC, __attribute__((__deprecated__)) emits a compiler warning.
That only deals with functions. I want the macros and typedefs to vanish.
I know I'm using Py_UNICODE for example and -Werror does not tell me I am using a deprecated macro.
Barry
Victor
Le mar. 16 juin 2020 à 13:11, Barry Scott <barry@barrys-emacs.org <mailto:barry@barrys-emacs.org>> a écrit :
I have been following the discussions on removing deprecated macros and functions from the C API. I checked my code, PyCXX and have a coupld of issues that is easy to fix. But I may have missed something.
What would help me is to be able to build extensions with all the deprecated pieces of the C API removed.
A bit like the way the limited C API works via the -DPy_LIMITED_API=0x03040000 option.
What do you think?
Barry
capi-sig mailing list -- capi-sig@python.org To unsubscribe send an email to capi-sig-leave@python.org https://mail.python.org/mailman3/lists/capi-sig.python.org/ Member address: vstinner@python.org <mailto:vstinner@python.org>
-- Night gathers, and now my watch begins. It shall not end until my death.
Some APIs including PyUnicode_AsUnicode had not been marked as deprecated. But I marked them deprecated yesterday.
Macros like PyUnicode_AS_UNICODE will produce warning because they use PyUnicode_AsUnicode internally.
So please try the master branch.
Regards,
On Thu, Jun 18, 2020 at 4:12 AM Barry Scott <barry@barrys-emacs.org> wrote:
On 16 Jun 2020, at 13:56, Victor Stinner <vstinner@python.org> wrote:
You use -Werror to treat compiler warnings as errors. In GCC, __attribute__((__deprecated__)) emits a compiler warning.
That only deals with functions. I want the macros and typedefs to vanish.
I know I'm using Py_UNICODE for example and -Werror does not tell me I am using a deprecated macro.
Barry
Victor
Le mar. 16 juin 2020 à 13:11, Barry Scott <barry@barrys-emacs.org <mailto:barry@barrys-emacs.org>> a écrit :
I have been following the discussions on removing deprecated macros and functions from the C API. I checked my code, PyCXX and have a coupld of issues that is easy to fix. But I may have missed something.
What would help me is to be able to build extensions with all the deprecated pieces of the C API removed.
A bit like the way the limited C API works via the -DPy_LIMITED_API=0x03040000 option.
What do you think?
Barry
capi-sig mailing list -- capi-sig@python.org To unsubscribe send an email to capi-sig-leave@python.org https://mail.python.org/mailman3/lists/capi-sig.python.org/ Member address: vstinner@python.org <mailto:vstinner@python.org>
-- Night gathers, and now my watch begins. It shall not end until my death.
capi-sig mailing list -- capi-sig@python.org To unsubscribe send an email to capi-sig-leave@python.org https://mail.python.org/mailman3/lists/capi-sig.python.org/ Member address: songofacandy@gmail.com
-- Inada Naoki <songofacandy@gmail.com>
On 18 Jun 2020, at 02:46, Inada Naoki <songofacandy@gmail.com> wrote:
Some APIs including PyUnicode_AsUnicode had not been marked as deprecated. But I marked them deprecated yesterday.
Macros like PyUnicode_AS_UNICODE will produce warning because they use PyUnicode_AsUnicode internally.
So please try the master branch.
I do not routinely build python.
But I do run the alpha and beta. Is this going into 3.9 beta?
Barry
Regards,
On Thu, Jun 18, 2020 at 4:12 AM Barry Scott <barry@barrys-emacs.org <mailto:barry@barrys-emacs.org>> wrote:
On 16 Jun 2020, at 13:56, Victor Stinner <vstinner@python.org> wrote:
You use -Werror to treat compiler warnings as errors. In GCC, __attribute__((__deprecated__)) emits a compiler warning.
That only deals with functions. I want the macros and typedefs to vanish.
I know I'm using Py_UNICODE for example and -Werror does not tell me I am using a deprecated macro.
Barry
Victor
Le mar. 16 juin 2020 à 13:11, Barry Scott <barry@barrys-emacs.org <mailto:barry@barrys-emacs.org> <mailto:barry@barrys-emacs.org <mailto:barry@barrys-emacs.org>>> a écrit :
I have been following the discussions on removing deprecated macros and functions from the C API. I checked my code, PyCXX and have a coupld of issues that is easy to fix. But I may have missed something.
What would help me is to be able to build extensions with all the deprecated pieces of the C API removed.
A bit like the way the limited C API works via the -DPy_LIMITED_API=0x03040000 option.
What do you think?
Barry
capi-sig mailing list -- capi-sig@python.org <mailto:capi-sig@python.org> To unsubscribe send an email to capi-sig-leave@python.org <mailto:capi-sig-leave@python.org> https://mail.python.org/mailman3/lists/capi-sig.python.org/ <https://mail.python.org/mailman3/lists/capi-sig.python.org/> Member address: vstinner@python.org <mailto:vstinner@python.org> <mailto:vstinner@python.org <mailto:vstinner@python.org>>
-- Night gathers, and now my watch begins. It shall not end until my death.
capi-sig mailing list -- capi-sig@python.org <mailto:capi-sig@python.org> To unsubscribe send an email to capi-sig-leave@python.org <mailto:capi-sig-leave@python.org> https://mail.python.org/mailman3/lists/capi-sig.python.org/ <https://mail.python.org/mailman3/lists/capi-sig.python.org/> Member address: songofacandy@gmail.com <mailto:songofacandy@gmail.com>
-- Inada Naoki <songofacandy@gmail.com <mailto:songofacandy@gmail.com>>
On Fri, Jun 19, 2020 at 1:08 AM Barry Scott <barry@barrys-emacs.org> wrote:
I do not routinely build python.
But I do run the alpha and beta. Is this going into 3.9 beta?
Barry
Yes, next Python 3.9b4 will include the compiler warning.
-- Inada Naoki <songofacandy@gmail.com>
participants (3)
-
Barry Scott
-
Inada Naoki
-
Victor Stinner