Hi,

I have the pleasure of announcing that I accept the PEP 623 "Remove wstr
from Unicode", congratulations INADA-san!

I see this PEP as a good way to better communicate on incoming backward
incompatible C API changes. The PEP is a good document to explain the
Motivation, the Rationale and also to list affected C functions. It can
also be used and referenced in What's New in Python documents.

INADA-san: I let you update the PEP status. You may also announce the PEP
approval on the capi-sig mailing list.

Victor

Le mer. 8 juil. 2020 à 10:56, Victor Stinner <vstin...@python.org> a écrit :

> Hi,
>
> As the PEP delegate of the PEP 623, I plan to accept PEP 623 "Remove
> wstr from Unicode" next week. As far as I know, all previous remarks
> have been taken in account.
>
> https://www.python.org/dev/peps/pep-0623/
>
> I worked with INADA-san to adjust his PEP 623 plan:
>
> * DeprecationWarning warnings will be emitted as soon as Python 3.10
> to help developers detect the deprecation at runtime, rather than only
> announcing the deprecation with compiler warnings and in the
> documentation.
>
> * Developers have two Python releases (3.10 and 3.11) with these
> runtime warnings before functions are removed
>
> * The PEP lists all APIs which will be removed in Python 3.12.
>
> * The PEP gives links to past discussions and issues.
>
> About the "size > 0" condition in "PyUnicode_FromUnicode(NULL, size)
> and PyUnicode_FromStringAndSize(NULL, size) emit DeprecationWarning
> when size > 0". INADA-san made sure that Cython avoids
> PyUnicode_FromUnicode(NULL, 0) to create an empty string: it's already
> fixed! The fix will be part of the next Cython 0.29.x release (it
> should be 0.29.21). But it will take time until popular extension
> modules using Cython will distribute a new release with updated
> generated C code.
>
> INADA-san checked popular PyPI projects. The majority of projects
> impacted by the PEP are using Cython and so are easy to fix: just
> regenerate C code with the fixed Cython. He added: "A few projects,
> pyScss and Genshi are not straightforward. But it is not too hard and
> I will help them." We have time before Python 3.12 final to update
> these projects.
>
> The PEP 623 is backward incompatible on purpose. If needed, it remains
> possible to use a single code base working on Python 2.7 and Python
> 3.12 using #ifdef. But Python 3.12 will not be released before 2023:
> three years after Python 2 end of life, so I think that it's
> reasonable for extension modules to consider dropping Python 2 support
> to implement the PEP 623 (stop using these deprecated C APIs).
>
> Victor
> --
> Night gathers, and now my watch begins. It shall not end until my death.
>
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/YAX5DP7IBDJOEAAFJRND26OIRR6Y6APA/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to