From 0924b95f6e678beaf4a059d679515956bac608fb Mon Sep 17 00:00:00 2001 From: Erlend Egeberg Aasland Date: Sat, 7 May 2022 06:23:13 +0200 Subject: [PATCH 1/2] gh-92308: Add Pending Removal section to 3.11 What's New (#92309) * gh-92308: Add Pending Removal section to 3.11 What's New * Use compact list; drop attributions * Add short text, and also missing PyUnicode_InternImmortal * Fix formatting * markup fix * Update Doc/whatsnew/3.11.rst Co-authored-by: Victor Stinner * Apply suggestions from code review Co-authored-by: Victor Stinner Co-authored-by: Victor Stinner Co-authored-by: Ezio Melotti --- Doc/whatsnew/3.11.rst | 55 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index b9871f7ef69..c4e8e6f9a10 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -1217,6 +1217,61 @@ Deprecated (Contributed by Alex Waygood in :gh:`92332`.) +Pending Removal in Python 3.12 +============================== + +The following APIs have been deprecated in earlier Python releases, +and will be removed in Python 3.12. + +Python API: + +* :class:`pkgutil.ImpImporter` +* :class:`pkgutil.ImpLoader` +* :envvar:`PYTHONTHREADDEBUG` +* :func:`importlib.find_loader` +* :func:`importlib.util.module_for_loader` +* :func:`importlib.util.set_loader_wrapper` +* :func:`importlib.util.set_package_wrapper` +* :meth:`importlib.abc.Loader.module_repr` +* :meth:`importlib.abc.Loadermodule_repr` +* :meth:`importlib.abc.MetaPathFinder.find_module` +* :meth:`importlib.abc.MetaPathFinder.find_module` +* :meth:`importlib.abc.PathEntryFinder.find_loader` +* :meth:`importlib.abc.PathEntryFinder.find_module` +* :meth:`importlib.machinery.BuiltinImporter.find_module` +* :meth:`importlib.machinery.BuiltinLoader.module_repr` +* :meth:`importlib.machinery.FileFinder.find_loader` +* :meth:`importlib.machinery.FileFinder.find_module` +* :meth:`importlib.machinery.FrozenImporter.find_module` +* :meth:`importlib.machinery.FrozenLoader.module_repr` +* :meth:`importlib.machinery.PathFinder.find_module` +* :meth:`importlib.machinery.WindowsRegistryFinder.find_module` +* :meth:`pathlib.Path.link_to` +* The entire :ref:`distutils namespace ` +* :func:`cgi.log` +* :func:`sqlite3.OptimizedUnicode` +* :func:`sqlite3.enable_shared_cache` + +C API: + +* :c:func:`PyUnicode_AS_DATA` +* :c:func:`PyUnicode_AS_UNICODE` +* :c:func:`PyUnicode_AsUnicodeAndSize` +* :c:func:`PyUnicode_AsUnicode` +* :c:func:`PyUnicode_FromUnicode` +* :c:func:`PyUnicode_GET_DATA_SIZE` +* :c:func:`PyUnicode_GET_SIZE` +* :c:func:`PyUnicode_GetSize` +* :c:func:`PyUnicode_IS_COMPACT` +* :c:func:`PyUnicode_IS_READY` +* :c:func:`PyUnicode_READY` +* :c:func:`Py_UNICODE_WSTR_LENGTH` +* :c:func:`_PyUnicode_AsUnicode` +* :c:macro:`PyUnicode_WCHAR_KIND` +* :c:type:`PyUnicodeObject` +* :c:func:`PyUnicode_InternImmortal()` + + Removed ======= From bd030b633f98ea5d9f93ef0105a51d2faf67070d Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 7 May 2022 21:21:11 +0300 Subject: [PATCH 2/2] gh-88279: Fix compiler warning for using deprecated PySys_SetArgvEx (#92428) --- Python/sysmodule.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Python/sysmodule.c b/Python/sysmodule.c index edd1d1f23fd..4f8b4cc17f2 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -3302,7 +3302,10 @@ PySys_SetArgvEx(int argc, wchar_t **argv, int updatepath) void PySys_SetArgv(int argc, wchar_t **argv) { +_Py_COMP_DIAG_PUSH +_Py_COMP_DIAG_IGNORE_DEPR_DECLS PySys_SetArgvEx(argc, argv, Py_IsolatedFlag == 0); +_Py_COMP_DIAG_POP } /* Reimplementation of PyFile_WriteString() no calling indirectly