Skip to content

gh-95914: Add Py_UNICODE encode APIs removed in PEP 624 to 3.11 What's New #96016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Doc/whatsnew/3.11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2116,5 +2116,30 @@ Removed
API).
(Contributed by Victor Stinner in :issue:`45412`.)

* Remove the :c:type:`Py_UNICODE` encoder APIs,
as they have been deprecated since Python 3.3,
are little used
and are inefficient relative to the recommended alternatives.

The removed functions are:

* :func:`!PyUnicode_Encode`
* :func:`!PyUnicode_EncodeASCII`
* :func:`!PyUnicode_EncodeLatin1`
* :func:`!PyUnicode_EncodeUTF7`
* :func:`!PyUnicode_EncodeUTF8`
* :func:`!PyUnicode_EncodeUTF16`
* :func:`!PyUnicode_EncodeUTF32`
* :func:`!PyUnicode_EncodeUnicodeEscape`
* :func:`!PyUnicode_EncodeRawUnicodeEscape`
* :func:`!PyUnicode_EncodeCharmap`
* :func:`!PyUnicode_TranslateCharmap`
* :func:`!PyUnicode_EncodeDecimal`
* :func:`!PyUnicode_TransformDecimalToASCII`

See :pep:`624` for details and
:pep:`migration guidance <624#alternative-apis>`.
(Contributed by Inada Naoki in :issue:`44029`.)


.. _libb2: https://www.blake2.net/