You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since some APIs did not have Py_DEPRECATE until 3.9 (see #65140), it can not be removed in 3.10. I wrote PEP-623 for them.
This issue doesn't about them.
# Deprecated since Python 3.3, and not documented.
In Python 3.3 what's new:
:c:macro:`Py_UNICODE_strlen`: use :c:func:`PyUnicode_GetLength` or
:c:macro:`PyUnicode_GET_LENGTH`
:c:macro:`Py_UNICODE_strcat`: use :c:func:`PyUnicode_CopyCharacters` or
:c:func:`PyUnicode_FromFormat`
:c:macro:`Py_UNICODE_strcpy`, :c:macro:`Py_UNICODE_strncpy`,
:c:macro:`Py_UNICODE_COPY`: use :c:func:`PyUnicode_CopyCharacters` or
:c:func:`PyUnicode_Substring`
:c:macro:`Py_UNICODE_strcmp`: use :c:func:`PyUnicode_Compare`
:c:macro:`Py_UNICODE_strncmp`: use :c:func:`PyUnicode_Tailmatch`
:c:macro:`Py_UNICODE_strchr`, :c:macro:`Py_UNICODE_strrchr`: use
:c:func:`PyUnicode_FindChar`
These functions are not documented. But they has Py_DEPRECATED(3.3) from Python 3.6.
Let's remove them in 3.10.
# Deprecated since Python 3.3 with document
Some APIs has document with .. deprecated:: 3.3 4.0.
PyLong_FromUnicode
PyUnicode_TransformDecimalToASCII
PyUnicode_AsUnicodeCopy
PyUnicode_Encode
PyUnicode_EncodeUTF7
PyUnicode_EncodeUTF8
PyUnicode_EncodeUTF16
PyUnicode_EncodeUTF32
PyUnicode_EncodeUnicodeEscape
PyUnicode_EncodeRawUnicodeEscape
PyUnicode_EncodeLatin1
PyUnicode_EncodeASCII
PyUnicode_EncodeCharmap
PyUnicode_TranslateCharmap
PyUnicode_EncodeMBCS
a) Can we replace 4.0 with 3.10 and remove them in 3.10?
b) Or should we replace 4.0 with 3.11 and wait one more year?
PyUnicode_EncodeDecimal
It is used in PyLong_FromUnicode. Deprecate in 3.10 and remove in 3.12
PyUnicode_TransformDecimalToASCII
While PEP-393 deprecate this too, its document doesn't has deprecated. Deprecate in 3.10 and remove in 3.12
_PyUnicode_ToLowercase, _PyUnicode_ToUppercase
They are not deprecated by PEP-393, but bpo-12736. Deprecate in 3.10 and remove in 3.12.
On the other hand, _PyUnicode_ToTitlecase has Py_DEPRECATED. It can be removed in 3.10.
Activity
methane commentedon Jun 26, 2020
# APIs relating to wstr
Since some APIs did not have Py_DEPRECATE until 3.9 (see #65140), it can not be removed in 3.10. I wrote PEP-623 for them.
This issue doesn't about them.
# Deprecated since Python 3.3, and not documented.
In Python 3.3 what's new:
:c:macro:`PyUnicode_GET_LENGTH`
:c:func:`PyUnicode_FromFormat`
:c:macro:`Py_UNICODE_COPY`: use :c:func:`PyUnicode_CopyCharacters` or
:c:func:`PyUnicode_Substring`
:c:func:`PyUnicode_FindChar`
These functions are not documented. But they has Py_DEPRECATED(3.3) from Python 3.6.
Let's remove them in 3.10.
# Deprecated since Python 3.3 with document
Some APIs has document with
.. deprecated:: 3.3 4.0.a) Can we replace 4.0 with 3.10 and remove them in 3.10?
b) Or should we replace 4.0 with 3.11 and wait one more year?
methane commentedon Jun 27, 2020
New changeset 20a7902 by Inada Naoki in branch 'master':
bpo-41123: Remove Py_UNICODE_str* functions (GH-21164)
20a7902
methane commentedon Jun 27, 2020
I chose this because they are deprecated since 3.3, and Py_DEPRECATED is used since 3.6.
methane commentedon Jun 28, 2020
APIs have /* Py_DEPRECATED(3.3) */
PyUnicode_EncodeDecimal
It is used in PyLong_FromUnicode. Deprecate in 3.10 and remove in 3.12
PyUnicode_TransformDecimalToASCII
While PEP-393 deprecate this too, its document doesn't has
deprecated. Deprecate in 3.10 and remove in 3.12_PyUnicode_ToLowercase, _PyUnicode_ToUppercase
They are not deprecated by PEP-393, but bpo-12736. Deprecate in 3.10 and remove in 3.12.
On the other hand, _PyUnicode_ToTitlecase has Py_DEPRECATED. It can be removed in 3.10.
methane commentedon Jun 29, 2020
I confirmed PyUnicode_GetMax is not used in top4000 packages.
methane commentedon Jun 29, 2020
New changeset d9f2a13 by Inada Naoki in branch 'master':
bpo-41123: Remove PyUnicode_GetMax() (GH-21192)
d9f2a13
methane commentedon Jun 29, 2020
New changeset e4f1fe6 by Inada Naoki in branch 'master':
bpo-41123: Remove PyLong_FromUnicode() (GH-21204)
e4f1fe6
methane commentedon Jun 29, 2020
New changeset 02134da by Inada Naoki in branch '3.9':
bpo-41123: Doc: PyLong_FromUnicode will be removed in 3.10 (GH-21205)
02134da
miss-islington commentedon Jun 29, 2020
New changeset ea16430 by Miss Islington (bot) in branch '3.8':
bpo-41123: Doc: PyLong_FromUnicode will be removed in 3.10 (GH-21205)
ea16430
methane commentedon Jun 29, 2020
PyUnicode_AsUnicodeCopy is not used in top 4000 packages. Let's remove it too.
methane commentedon Jun 30, 2020
New changeset b333266 by Inada Naoki in branch 'master':
bpo-41123: Remove PyUnicode_AsUnicodeCopy (GH-21209)
b333266
methane commentedon Jun 30, 2020
New changeset 2ea6a99 by Inada Naoki in branch '3.9':
bpo-41123: Remove PyUnicode_AsUnicodeCopy in 3.10 (GH-21227)
2ea6a99
miss-islington commentedon Jun 30, 2020
New changeset 41d6e3f by Miss Islington (bot) in branch '3.8':
bpo-41123: Remove PyUnicode_AsUnicodeCopy in 3.10 (GH-21227)
41d6e3f
vstinner commentedon Oct 11, 2021
New changeset 1f316ea by Victor Stinner in branch 'main':
bpo-41123: Remove Py_UNICODE_COPY() and Py_UNICODE_FILL() (GH-28887)
1f316ea