summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-11-07 22:36:13 (GMT)
committerGitHub <noreply@github.com>2023-11-07 22:36:13 (GMT)
commit11e83488c5a4a6e75a4f363a2e1a45574fd53573 (patch)
tree4d3ad20c063f098a2b142aace0baade00e465ac9 /Doc
parentea970fb116a114f2c47cc8f21df00166d43ab78b (diff)
downloadcpython-11e83488c5a4a6e75a4f363a2e1a45574fd53573.zip
cpython-11e83488c5a4a6e75a4f363a2e1a45574fd53573.tar.gz
cpython-11e83488c5a4a6e75a4f363a2e1a45574fd53573.tar.bz2
gh-111089: Revert PyUnicode_AsUTF8() changes (#111833)
* Revert "gh-111089: Use PyUnicode_AsUTF8() in Argument Clinic (#111585)" This reverts commit d9b606b3d04fc56fb0bcc479d7d6c14562edb5e2. * Revert "gh-111089: Use PyUnicode_AsUTF8() in getargs.c (#111620)" This reverts commit cde1071b2a72e8261ca66053ef61431b7f3a81fd. * Revert "gh-111089: PyUnicode_AsUTF8() now raises on embedded NUL (#111091)" This reverts commit d731579bfb9a497cfb0076cb6b221058a20088fe. * Revert "gh-111089: Add PyUnicode_AsUTF8() to the limited C API (#111121)" This reverts commit d8f32be5b6a736dc2fc9dca3f1bf176c82fc9b44. * Revert "gh-111089: Use PyUnicode_AsUTF8() in sqlite3 (#111122)" This reverts commit 37e4e20eaa8f27ada926d49e5971fecf0477ad26.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/c-api/unicode.rst8
-rw-r--r--Doc/data/stable_abi.dat1
-rw-r--r--Doc/whatsnew/3.13.rst9
3 files changed, 0 insertions, 18 deletions
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index 5fa3796..e654412 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -992,19 +992,11 @@ These are the UTF-8 codec APIs:
As :c:func:`PyUnicode_AsUTF8AndSize`, but does not store the size.
- Raise an exception if the *unicode* string contains embedded null
- characters. To accept embedded null characters and truncate on purpose
- at the first null byte, ``PyUnicode_AsUTF8AndSize(unicode, NULL)`` can be
- used instead.
-
.. versionadded:: 3.3
.. versionchanged:: 3.7
The return type is now ``const char *`` rather of ``char *``.
- .. versionchanged:: 3.13
- Raise an exception if the string contains embedded null characters.
-
UTF-32 Codecs
"""""""""""""
diff --git a/Doc/data/stable_abi.dat b/Doc/data/stable_abi.dat
index 52d6d96..811b1bd 100644
--- a/Doc/data/stable_abi.dat
+++ b/Doc/data/stable_abi.dat
@@ -726,7 +726,6 @@ function,PyUnicode_AsUCS4,3.7,,
function,PyUnicode_AsUCS4Copy,3.7,,
function,PyUnicode_AsUTF16String,3.2,,
function,PyUnicode_AsUTF32String,3.2,,
-function,PyUnicode_AsUTF8,3.13,,
function,PyUnicode_AsUTF8AndSize,3.10,,
function,PyUnicode_AsUTF8String,3.2,,
function,PyUnicode_AsUnicodeEscapeString,3.2,,
diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst
index 84d50a6..291e276 100644
--- a/Doc/whatsnew/3.13.rst
+++ b/Doc/whatsnew/3.13.rst
@@ -1149,9 +1149,6 @@ New Features
:c:func:`PyErr_WriteUnraisable`, but allow to customize the warning mesage.
(Contributed by Serhiy Storchaka in :gh:`108082`.)
-* Add :c:func:`PyUnicode_AsUTF8` function to the limited C API.
- (Contributed by Victor Stinner in :gh:`111089`.)
-
Porting to Python 3.13
----------------------
@@ -1222,12 +1219,6 @@ Porting to Python 3.13
Note that ``Py_TRASHCAN_BEGIN`` has a second argument which
should be the deallocation function it is in.
-* The :c:func:`PyUnicode_AsUTF8` function now raises an exception if the string
- contains embedded null characters. To accept embedded null characters and
- truncate on purpose at the first null byte,
- ``PyUnicode_AsUTF8AndSize(unicode, NULL)`` can be used instead.
- (Contributed by Victor Stinner in :gh:`111089`.)
-
* On Windows, ``Python.h`` no longer includes the ``<stddef.h>`` standard
header file. If needed, it should now be included explicitly. For example, it
provides ``offsetof()`` function, and ``size_t`` and ``ptrdiff_t`` types.