diff --git a/Doc/data/stable_abi.dat b/Doc/data/stable_abi.dat index 52d6d967d66327..811b1bd84d2417 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 8db8a798caf0a7..291e276dc67ce0 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 ---------------------- diff --git a/Lib/test/test_stable_abi_ctypes.py b/Lib/test/test_stable_abi_ctypes.py index 85a63c44b49431..4976ac3642bbe4 100644 --- a/Lib/test/test_stable_abi_ctypes.py +++ b/Lib/test/test_stable_abi_ctypes.py @@ -745,7 +745,6 @@ def test_windows_feature_macros(self): "PyUnicode_AsUCS4Copy", "PyUnicode_AsUTF16String", "PyUnicode_AsUTF32String", - "PyUnicode_AsUTF8", "PyUnicode_AsUTF8AndSize", "PyUnicode_AsUTF8String", "PyUnicode_AsUnicodeEscapeString", diff --git a/Misc/NEWS.d/next/C API/2023-10-20-18-07-24.gh-issue-111089.RxkyrQ.rst b/Misc/NEWS.d/next/C API/2023-10-20-18-07-24.gh-issue-111089.RxkyrQ.rst deleted file mode 100644 index fe32e06fe4f063..00000000000000 --- a/Misc/NEWS.d/next/C API/2023-10-20-18-07-24.gh-issue-111089.RxkyrQ.rst +++ /dev/null @@ -1,2 +0,0 @@ -Add :c:func:`PyUnicode_AsUTF8` function to the limited C API. Patch by -Victor Stinner. diff --git a/Misc/stable_abi.toml b/Misc/stable_abi.toml index b55bb599d71dcc..22b25dd0ec141f 100644 --- a/Misc/stable_abi.toml +++ b/Misc/stable_abi.toml @@ -2478,8 +2478,6 @@ added = '3.13' [function.PySys_AuditTuple] added = '3.13' -[function.PyUnicode_AsUTF8] - added = '3.13' [function._Py_SetRefcnt] added = '3.13' abi_only = true diff --git a/Modules/_multiprocessing/posixshmem.c b/Modules/_multiprocessing/posixshmem.c index b1f776cbbeca3f..cd08a9fedc0578 100644 --- a/Modules/_multiprocessing/posixshmem.c +++ b/Modules/_multiprocessing/posixshmem.c @@ -48,7 +48,7 @@ _posixshmem_shm_open_impl(PyObject *module, PyObject *path, int flags, { int fd; int async_err = 0; - const char *name = PyUnicode_AsUTF8(path); + const char *name = PyUnicode_AsUTF8AndSize(path, NULL); if (name == NULL) { return -1; } @@ -87,7 +87,7 @@ _posixshmem_shm_unlink_impl(PyObject *module, PyObject *path) { int rv; int async_err = 0; - const char *name = PyUnicode_AsUTF8(path); + const char *name = PyUnicode_AsUTF8AndSize(path, NULL); if (name == NULL) { return NULL; } diff --git a/PC/python3dll.c b/PC/python3dll.c index fa6bf1f0282b0a..07aa84c91f9fc7 100755 --- a/PC/python3dll.c +++ b/PC/python3dll.c @@ -662,7 +662,6 @@ EXPORT_FUNC(PyUnicode_AsUCS4Copy) EXPORT_FUNC(PyUnicode_AsUnicodeEscapeString) EXPORT_FUNC(PyUnicode_AsUTF16String) EXPORT_FUNC(PyUnicode_AsUTF32String) -EXPORT_FUNC(PyUnicode_AsUTF8) EXPORT_FUNC(PyUnicode_AsUTF8AndSize) EXPORT_FUNC(PyUnicode_AsUTF8String) EXPORT_FUNC(PyUnicode_AsWideChar)