From 1d30270a6e4135950c4a21de143c5c074a5b254c Mon Sep 17 00:00:00 2001 From: "C.A.M. Gerlach" Date: Sun, 23 Oct 2022 23:00:22 -0500 Subject: [PATCH 1/5] Fix names/references of pending removal APIs --- Doc/whatsnew/3.11.rst | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 79afc1f99e99d9..b230db51df8a1e 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -1627,27 +1627,25 @@ C APIs pending removal are * :envvar:`PYTHONTHREADDEBUG` * :func:`importlib.find_loader` * :func:`importlib.util.module_for_loader` -* :func:`importlib.util.set_loader_wrapper` -* :func:`importlib.util.set_package_wrapper` +* :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.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:`!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` +* The entire :ref:`distutils package ` +* :func:`!cgi.log` +* :func:`!sqlite3.OptimizedUnicode` +* :func:`!sqlite3.enable_shared_cache` .. _whatsnew311-removed: From 518bfd2fc5d59cdfafa197e4567b1182111a3194 Mon Sep 17 00:00:00 2001 From: "C.A.M. Gerlach" Date: Sun, 23 Oct 2022 23:03:10 -0500 Subject: [PATCH 2/5] Sort list of APIs pending removal alphabetically --- Doc/whatsnew/3.11.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index b230db51df8a1e..48ce72cc5b39a5 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -1622,13 +1622,10 @@ and will be removed in Python 3.12. C APIs pending removal are :ref:`listed separately `. -* :class:`pkgutil.ImpImporter` -* :class:`pkgutil.ImpLoader` * :envvar:`PYTHONTHREADDEBUG` +* The entire :ref:`distutils package ` +* :func:`!cgi.log` * :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.MetaPathFinder.find_module` * :meth:`importlib.abc.PathEntryFinder.find_loader` @@ -1641,11 +1638,14 @@ C APIs pending removal are * :meth:`!importlib.machinery.FrozenLoader.module_repr` * :meth:`importlib.machinery.PathFinder.find_module` * :meth:`!importlib.machinery.WindowsRegistryFinder.find_module` +* :func:`importlib.util.module_for_loader` +* :func:`!importlib.util.set_loader_wrapper` +* :func:`!importlib.util.set_package_wrapper` +* :class:`pkgutil.ImpImporter` +* :class:`pkgutil.ImpLoader` * :meth:`pathlib.Path.link_to` -* The entire :ref:`distutils package ` -* :func:`!cgi.log` -* :func:`!sqlite3.OptimizedUnicode` * :func:`!sqlite3.enable_shared_cache` +* :func:`!sqlite3.OptimizedUnicode` .. _whatsnew311-removed: From 3f17a8e1bde750eb6de2f87d1b6969792f7975a4 Mon Sep 17 00:00:00 2001 From: "C.A.M. Gerlach" Date: Sun, 23 Oct 2022 23:24:40 -0500 Subject: [PATCH 3/5] Add missing modules/submodules pending removal in 3.12 --- Doc/whatsnew/3.11.rst | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 48ce72cc5b39a5..5ce70cb62d20d6 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -1622,8 +1622,12 @@ and will be removed in Python 3.12. C APIs pending removal are :ref:`listed separately `. -* :envvar:`PYTHONTHREADDEBUG` -* The entire :ref:`distutils package ` +* The :mod:`asynchat` module +* The :mod:`asyncore` module +* The :ref:`entire distutils package ` +* The :mod:`imp` module +* The :class:`typing.io ` namespace +* The :class:`typing.re ` namespace * :func:`!cgi.log` * :func:`importlib.find_loader` * :meth:`importlib.abc.Loader.module_repr` @@ -1646,7 +1650,8 @@ C APIs pending removal are * :meth:`pathlib.Path.link_to` * :func:`!sqlite3.enable_shared_cache` * :func:`!sqlite3.OptimizedUnicode` - +* :mod:`unittest` ``fail*`` and ``assert*`` :ref:`deprecated-aliases` +* :envvar:`PYTHONTHREADDEBUG` environment variable .. _whatsnew311-removed: .. _whatsnew311-python-api-removed: From 79cead2616d9693cdbfb06f8db0b1742cfea432b Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Mon, 24 Oct 2022 15:10:33 +0200 Subject: [PATCH 4/5] Add table of unittest deprecated aliases to 3.11 What's New --- Doc/whatsnew/3.11.rst | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 8505051463dbd1..e45b46824d2dbb 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -1766,8 +1766,28 @@ C APIs pending removal are * :meth:`pathlib.Path.link_to` * :func:`!sqlite3.enable_shared_cache` * :func:`!sqlite3.OptimizedUnicode` -* :mod:`unittest` ``fail*`` and ``assert*`` :ref:`deprecated-aliases` * :envvar:`PYTHONTHREADDEBUG` environment variable +* :mod:`unittest` ``fail*`` and ``assert*`` deprecated-aliases: + + ============================ =============================== =============== + Deprecated alias Method Name Deprecated in + ============================ =============================== =============== + ``failUnless`` :meth:`.assertTrue` 3.1 + ``failIf`` :meth:`.assertFalse` 3.1 + ``failUnlessEqual`` :meth:`.assertEqual` 3.1 + ``failIfEqual`` :meth:`.assertNotEqual` 3.1 + ``failUnlessAlmostEqual`` :meth:`.assertAlmostEqual` 3.1 + ``failIfAlmostEqual`` :meth:`.assertNotAlmostEqual` 3.1 + ``failUnlessRaises`` :meth:`.assertRaises` 3.1 + ``assert_`` :meth:`.assertTrue` 3.2 + ``assertEquals`` :meth:`.assertEqual` 3.2 + ``assertNotEquals`` :meth:`.assertNotEqual` 3.2 + ``assertAlmostEquals`` :meth:`.assertAlmostEqual` 3.2 + ``assertNotAlmostEquals`` :meth:`.assertNotAlmostEqual` 3.2 + ``assertRegexpMatches`` :meth:`.assertRegex` 3.2 + ``assertRaisesRegexp`` :meth:`.assertRaisesRegex` 3.2 + ``assertNotRegexpMatches`` :meth:`.assertNotRegex` 3.5 + ============================ =============================== =============== .. _whatsnew311-removed: .. _whatsnew311-python-api-removed: From 5090fb84c2932fdae2f2fa6fe152e2f98a399fb0 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Mon, 24 Oct 2022 15:20:57 +0200 Subject: [PATCH 5/5] Update Doc/whatsnew/3.11.rst Co-authored-by: Jelle Zijlstra --- 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 e45b46824d2dbb..174be46810d176 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -1767,7 +1767,7 @@ C APIs pending removal are * :func:`!sqlite3.enable_shared_cache` * :func:`!sqlite3.OptimizedUnicode` * :envvar:`PYTHONTHREADDEBUG` environment variable -* :mod:`unittest` ``fail*`` and ``assert*`` deprecated-aliases: +* The following deprecated aliases in :mod:`unittest`: ============================ =============================== =============== Deprecated alias Method Name Deprecated in