Message 355535 - Python tracker (original) (raw)

I closed bpo-38604 as a duplicate. Copy of my messages.

- (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-10-27 16:02

Python 3.3 deprecated the C API functions using Py_UNICODE type. Examples in the doc:

Currently, functions removal is scheduled for Python 4.0 but I would prefer that Python 4.0 doesn't have a long list of removed features, but no more than usual. So I'm trying to remove a few functions from Python 3.9, and try to prepare removal for others.

Py_UNICODE C API was mostly kept for backward compatibility with Python 2. Since Python 2 support ends at the end of the year, can we start to organize Py_UNICODE C API removal?

There are multiple questions:

I propose to:

Honestly, if the removal is causing too much issues, I'm fine to make slowdown the removal. It's just a matter of clearly communicating our intent.

Maybe we should also announce the scheduled removal in What's in Python 3.9 and in the capi-sig mailing list.

- (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-10-27 16:15

(Right now) write an exhaustive list of all deprecated APIs: functions, constants, types, etc.

I searched "4.0" in the documentation:

- (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-10-28 11:06

A preleminary step was to modify PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() to remove the internal caching: it has been done in Python 3.8.0 with bpo-30863.