Repository navigation
Conversation
Py_UNICODE was a typedef to wchar_t, deprecated by PEP 393 since Python 3.3 and at runtime since Python 3.13, and scheduled for removal in 3.16. Nothing in CPython used it: the Argument Clinic converter of the same name generates const wchar_t *, and the typedef is not part of the stable ABI. The documentation references to it are kept, with the link suppressed, as was done for PyWeakref_GetObject in pythonGH-133657.
Documentation build overview
403 files changed ·
|
vstinner
left a comment
There was a problem hiding this comment.
IMO PY_UNICODE_TYPE should also be removed in the same PR.
|
Why not keep both? Simple typedefs have virtually no maintenance cost. |
|
Removing |
|
I left |
That seems unlikely to me. What kinds of bugs is this likely to help discover? Removing |
|
@encukou: If we don't remove I searched for
Notes:
I didn't check if Details |
Yes, that's the current guidance in PEP-387:
|
|
An LLM check on the 29 projects:
Details
|
Py_UNICODEis a typedef towchar_t, deprecated by :pep:393since 3.3 and at runtime since 3.13, listed for removal in 3.16. This removes it.Nothing in CPython used the typedef. The Argument Clinic converter of the same name is unrelated: it generates
const wchar_t *. It is not in the stable ABI.Documentation references are kept with the link suppressed (
:c:type:!Py_UNICODE``), as GH-133657 did forPyWeakref_GetObject, and the anchor is recorded in `Doc/tools/removed-ids.txt`.This covers one of the three groups in gh-154757 and one box in gh-133644. The other two groups are not touched here: GH-136277 and GH-133654 are already open for them, and
Py_SetProgramNameandPySys_SetArgvwere reverted once before in gh-117987.PY_UNICODE_TYPE, the adjacent typedef, is left alone. It is deprecated but is not listed for removal in 3.16.Verified with a full build (
make -j),test_capiandtest_clinic(1824 tests, SUCCESS). A file usingPy_UNICODEnow fails to compile with "unknown type name", whilewchar_tandPY_UNICODE_TYPEstill work. Sphinx is not installed here, so the docs build is unverified locally.