From 11dbba7c74270270e516cea1b07a0a214dceae55 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Wed, 4 May 2022 09:22:34 -0600 Subject: [PATCH 1/7] gh-92308: Add Pending Removal section to 3.11 What's New --- Doc/whatsnew/3.11.rst | 59 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 2f32b56423de79..8ddd39b04d6f71 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -1173,6 +1173,65 @@ Deprecated (Contributed by Serhiy Storchaka in :gh:`91760`.) +Pending Removal +=============== + +* ``Py_UNICODE`` encoder APIs are pending removal as per :pep:`624` + +* The entire :ref:`distutils namespace ` is scheduled for + removal in Python 3.12. + +* The various implementations of + :meth:`importlib.abc.MetaPathFinder.find_module` ( + :meth:`importlib.machinery.BuiltinImporter.find_module`, + :meth:`importlib.machinery.FrozenImporter.find_module`, + :meth:`importlib.machinery.WindowsRegistryFinder.find_module`, + :meth:`importlib.machinery.PathFinder.find_module`, + :meth:`importlib.abc.MetaPathFinder.find_module` ), + :meth:`importlib.abc.PathEntryFinder.find_module` ( + :meth:`importlib.machinery.FileFinder.find_module` ), and + :meth:`importlib.abc.PathEntryFinder.find_loader` ( + :meth:`importlib.machinery.FileFinder.find_loader` ) + are slated for removal in Python 3.12. + (Contributed by Brett Cannon in :issue:`42135`.) + +* The deprecations of :mod:`imp`, :func:`importlib.find_loader`, + :func:`importlib.util.set_package_wrapper`, + :func:`importlib.util.set_loader_wrapper`, + :func:`importlib.util.module_for_loader`, + :class:`pkgutil.ImpImporter`, and + :class:`pkgutil.ImpLoader` are slated for in Python 3.12. + (Contributed by Brett Cannon in :issue:`43720`.) + +* :meth:`importlib.abc.Loadermodule_repr` is scheduled for removal in + Python 3.12. + (Contributed by Brett Cannon in :issue:`42137`.) + +* :meth:`importlib.abc.Loader.module_repr`, + :meth:`importlib.machinery.FrozenLoader.module_repr`, and + :meth:`importlib.machinery.BuiltinLoader.module_repr` are + slated for removal in Python 3.12. + (Contributed by Brett Cannon in :issue:`42136`.) + +* Undocumented ``sqlite3.OptimizedUnicode`` is scheduled for removal in + Python 3.12. + (Contributed by Erlend E. Aasland in :issue:`42264`.) + +* Undocumented ``sqlite3.enable_shared_cache`` is scheduled for removal in + Python 3.12. + (Contributed by Erlend E. Aasland in :issue:`24464`.) + +* :meth:`pathlib.Path.link_to` is slated for removal in Python 3.12. + (Contributed by Barney Gale in :issue:`39950`.) + +* ``cgi.log()`` is slated for removal in Python 3.12. + (Contributed by Inada Naoki in :issue:`41139`.) + +* The threading debug (:envvar:`PYTHONTHREADDEBUG` environment variable) is + scheduled for removal in Python 3.12. + (Contributed by Victor Stinner in :issue:`44584`.) + + Removed ======= From e325c15e302ec38c274adf974e368139345a829f Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Wed, 4 May 2022 21:36:30 -0500 Subject: [PATCH 2/7] Use compact list; drop attributions --- Doc/whatsnew/3.11.rst | 101 ++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 57 deletions(-) diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 8ddd39b04d6f71..f29923865db796 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -1173,63 +1173,50 @@ Deprecated (Contributed by Serhiy Storchaka in :gh:`91760`.) -Pending Removal -=============== - -* ``Py_UNICODE`` encoder APIs are pending removal as per :pep:`624` - -* The entire :ref:`distutils namespace ` is scheduled for - removal in Python 3.12. - -* The various implementations of - :meth:`importlib.abc.MetaPathFinder.find_module` ( - :meth:`importlib.machinery.BuiltinImporter.find_module`, - :meth:`importlib.machinery.FrozenImporter.find_module`, - :meth:`importlib.machinery.WindowsRegistryFinder.find_module`, - :meth:`importlib.machinery.PathFinder.find_module`, - :meth:`importlib.abc.MetaPathFinder.find_module` ), - :meth:`importlib.abc.PathEntryFinder.find_module` ( - :meth:`importlib.machinery.FileFinder.find_module` ), and - :meth:`importlib.abc.PathEntryFinder.find_loader` ( - :meth:`importlib.machinery.FileFinder.find_loader` ) - are slated for removal in Python 3.12. - (Contributed by Brett Cannon in :issue:`42135`.) - -* The deprecations of :mod:`imp`, :func:`importlib.find_loader`, - :func:`importlib.util.set_package_wrapper`, - :func:`importlib.util.set_loader_wrapper`, - :func:`importlib.util.module_for_loader`, - :class:`pkgutil.ImpImporter`, and - :class:`pkgutil.ImpLoader` are slated for in Python 3.12. - (Contributed by Brett Cannon in :issue:`43720`.) - -* :meth:`importlib.abc.Loadermodule_repr` is scheduled for removal in - Python 3.12. - (Contributed by Brett Cannon in :issue:`42137`.) - -* :meth:`importlib.abc.Loader.module_repr`, - :meth:`importlib.machinery.FrozenLoader.module_repr`, and - :meth:`importlib.machinery.BuiltinLoader.module_repr` are - slated for removal in Python 3.12. - (Contributed by Brett Cannon in :issue:`42136`.) - -* Undocumented ``sqlite3.OptimizedUnicode`` is scheduled for removal in - Python 3.12. - (Contributed by Erlend E. Aasland in :issue:`42264`.) - -* Undocumented ``sqlite3.enable_shared_cache`` is scheduled for removal in - Python 3.12. - (Contributed by Erlend E. Aasland in :issue:`24464`.) - -* :meth:`pathlib.Path.link_to` is slated for removal in Python 3.12. - (Contributed by Barney Gale in :issue:`39950`.) - -* ``cgi.log()`` is slated for removal in Python 3.12. - (Contributed by Inada Naoki in :issue:`41139`.) - -* The threading debug (:envvar:`PYTHONTHREADDEBUG` environment variable) is - scheduled for removal in Python 3.12. - (Contributed by Victor Stinner in :issue:`44584`.) +Pending Removal in Python 3.12 +============================== + +* :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 ` +* ``cgi.log()`` +* ``sqlite3.OptimizedUnicode`` +* ``sqlite3.enable_shared_cache`` +* :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` Removed From f8c21449bdcd5aee33484baca8924b02ee4e87fb Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Thu, 5 May 2022 14:40:37 +0200 Subject: [PATCH 3/7] Add short text, and also missing PyUnicode_InternImmortal --- Doc/whatsnew/3.11.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index f29923865db796..b7670faf200b37 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -1176,6 +1176,11 @@ Deprecated Pending Removal in Python 3.12 ============================== +The following APIs have been deprecated in earlier Python releases, and are now +pending removal in Python 3.12. + +Python API:: + * :class:`pkgutil.ImpImporter` * :class:`pkgutil.ImpLoader` * :envvar:`PYTHONTHREADDEBUG` @@ -1202,6 +1207,9 @@ Pending Removal in Python 3.12 * ``cgi.log()`` * ``sqlite3.OptimizedUnicode`` * ``sqlite3.enable_shared_cache`` + +C API:: + * :c:func:`PyUnicode_AS_DATA` * :c:func:`PyUnicode_AS_UNICODE` * :c:func:`PyUnicode_AsUnicodeAndSize` @@ -1217,6 +1225,7 @@ Pending Removal in Python 3.12 * :c:func:`_PyUnicode_AsUnicode` * :c:macro:`PyUnicode_WCHAR_KIND` * c:type:`PyUnicodeObject` +* ``PyUnicode_InternImmortal()`` Removed From 65cf56e4343adcc47c33bd2082f5235d103cebc4 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Thu, 5 May 2022 14:41:47 +0200 Subject: [PATCH 4/7] Fix formatting --- Doc/whatsnew/3.11.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index b7670faf200b37..474d1951211a91 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -1224,7 +1224,7 @@ C API:: * :c:func:`Py_UNICODE_WSTR_LENGTH` * :c:func:`_PyUnicode_AsUnicode` * :c:macro:`PyUnicode_WCHAR_KIND` -* c:type:`PyUnicodeObject` +* :c:type:`PyUnicodeObject` * ``PyUnicode_InternImmortal()`` From ed590cc646ca05a5ded359dbc304ccba596cbafc Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Thu, 5 May 2022 14:58:45 +0200 Subject: [PATCH 5/7] markup fix --- Doc/whatsnew/3.11.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 474d1951211a91..ad154de9933bf2 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -1179,7 +1179,7 @@ Pending Removal in Python 3.12 The following APIs have been deprecated in earlier Python releases, and are now pending removal in Python 3.12. -Python API:: +Python API: * :class:`pkgutil.ImpImporter` * :class:`pkgutil.ImpLoader` @@ -1208,7 +1208,7 @@ Python API:: * ``sqlite3.OptimizedUnicode`` * ``sqlite3.enable_shared_cache`` -C API:: +C API: * :c:func:`PyUnicode_AS_DATA` * :c:func:`PyUnicode_AS_UNICODE` From 11ec7a82d7227f146cee58111d0f385496fa7010 Mon Sep 17 00:00:00 2001 From: Erlend Egeberg Aasland Date: Thu, 5 May 2022 17:15:35 +0200 Subject: [PATCH 6/7] Update Doc/whatsnew/3.11.rst Co-authored-by: Victor Stinner --- Doc/whatsnew/3.11.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index ad154de9933bf2..7cddf6ba29cf53 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -1225,7 +1225,7 @@ C API: * :c:func:`_PyUnicode_AsUnicode` * :c:macro:`PyUnicode_WCHAR_KIND` * :c:type:`PyUnicodeObject` -* ``PyUnicode_InternImmortal()`` +* :c:func:`PyUnicode_InternImmortal()` Removed From 0d43d89b0f6a7fd6155b3951b7b871daf08f771d Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sat, 7 May 2022 06:06:04 +0200 Subject: [PATCH 7/7] Apply suggestions from code review Co-authored-by: Victor Stinner --- Doc/whatsnew/3.11.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 7cddf6ba29cf53..be4ba3aba209a2 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -1176,8 +1176,8 @@ Deprecated Pending Removal in Python 3.12 ============================== -The following APIs have been deprecated in earlier Python releases, and are now -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: @@ -1204,9 +1204,9 @@ Python API: * :meth:`importlib.machinery.WindowsRegistryFinder.find_module` * :meth:`pathlib.Path.link_to` * The entire :ref:`distutils namespace ` -* ``cgi.log()`` -* ``sqlite3.OptimizedUnicode`` -* ``sqlite3.enable_shared_cache`` +* :func:`cgi.log` +* :func:`sqlite3.OptimizedUnicode` +* :func:`sqlite3.enable_shared_cache` C API: