From 1c0fad330ef2890d618d5dcc0927a3471317cc45 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 9 Nov 2024 09:17:49 -0500 Subject: [PATCH 1/9] Docs: re-create cgi and cgitb pages to document their removal. This shows just two modules as an example. Will flesh it out with the rest of PEP 594 if people like the approach. Will also need to change the redirects that were created here: https://github.com/python/psf-salt/pull/521/files --- Doc/library/cgi.rst | 37 +++++++++++++++++++++++++++++++++++++ Doc/library/cgitb.rst | 12 ++++++++++++ Doc/library/index.rst | 1 + Doc/library/removed.rst | 17 +++++++++++++++++ 4 files changed, 67 insertions(+) create mode 100644 Doc/library/cgi.rst create mode 100644 Doc/library/cgitb.rst create mode 100644 Doc/library/removed.rst diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst new file mode 100644 index 00000000000000..bd7702b2e76e0e --- /dev/null +++ b/Doc/library/cgi.rst @@ -0,0 +1,37 @@ +:mod:`!cgi` --- Common Gateway Interface support +================================================ + +.. module:: cgi + :synopsis: Removed in 3.13. + :deprecated: + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +A fork of the module on PyPI can be used instead: :pypi:`legacy-cgi`. + +If you want to update your code using supported standard library modules: + +* ``cgi.FieldStorage`` can typically be replaced with + :func:`urllib.parse.parse_qsl` for ``GET`` and ``HEAD`` requests, and the + :mod:`email.message` module or :pypi:`multipart` PyPI project for ``POST`` + and ``PUT``. + +* ``cgi.parse()`` can be replaced by calling :func:`urllib.parse.parse_qs` + directly on the desired query string, except for ``multipart/form-data`` + input, which can be handled as described for ``cgi.parse_multipart()``. + +* ``cgi.parse_multipart()`` can be replaced with the functionality in the + :mod:`email` package (e.g. :class:`email.message.EmailMessage` and + :class:`email.message.Message`) which implements the same MIME RFCs, or + with the :pypi:`multipart` PyPI project. + +* ``cgi.parse_header()`` can be replaced with the functionality in the + :mod:`email` package, which implements the same MIME RFCs. For example, + with :class:`email.message.EmailMessage`:: + + from email.message import EmailMessage + msg = EmailMessage() + msg['content-type'] = 'application/json; charset="utf8"' + main, params = msg.get_content_type(), msg['content-type'].params diff --git a/Doc/library/cgitb.rst b/Doc/library/cgitb.rst new file mode 100644 index 00000000000000..61401a03144e8e --- /dev/null +++ b/Doc/library/cgitb.rst @@ -0,0 +1,12 @@ +:mod:`!cgitb` --- Traceback manager for CGI scripts +=================================================== + +.. module:: cgitb + :synopsis: Removed in 3.13. + :deprecated: + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +A fork of the module on PyPI can be used instead: :pypi:`legacy-cgi`. diff --git a/Doc/library/index.rst b/Doc/library/index.rst index 0b348ae6f5c8c0..951fbcf13fbb13 100644 --- a/Doc/library/index.rst +++ b/Doc/library/index.rst @@ -75,4 +75,5 @@ the `Python Package Index `_. unix.rst cmdline.rst superseded.rst + removed.rst security_warnings.rst diff --git a/Doc/library/removed.rst b/Doc/library/removed.rst new file mode 100644 index 00000000000000..e463e3e88e24d0 --- /dev/null +++ b/Doc/library/removed.rst @@ -0,0 +1,17 @@ +:tocdepth: 1 + +.. _removed: + +*************** +Removed Modules +*************** + +The modules described in this chapter have been removed from the Python +standard library. They are documented here to help people find replacements. + + +.. toctree:: + :maxdepth: 1 + + cgi.rst + cgitb.rst From 47439677b33210dd14d351d8c4b7a8ae9daac027 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 9 Nov 2024 14:15:35 -0500 Subject: [PATCH 2/9] remove the detailed recommendations; link to latest supported version --- Doc/library/cgi.rst | 28 ++++------------------------ Doc/library/cgitb.rst | 7 ++++++- 2 files changed, 10 insertions(+), 25 deletions(-) diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst index bd7702b2e76e0e..c7b3cee40f77f0 100644 --- a/Doc/library/cgi.rst +++ b/Doc/library/cgi.rst @@ -10,28 +10,8 @@ It was :ref:`removed in Python 3.13 ` after being deprecated in Python 3.11. The removal was decided in :pep:`594`. A fork of the module on PyPI can be used instead: :pypi:`legacy-cgi`. +This is a copy of the cgi module, no longer maintained or supported by the core +Python team. -If you want to update your code using supported standard library modules: - -* ``cgi.FieldStorage`` can typically be replaced with - :func:`urllib.parse.parse_qsl` for ``GET`` and ``HEAD`` requests, and the - :mod:`email.message` module or :pypi:`multipart` PyPI project for ``POST`` - and ``PUT``. - -* ``cgi.parse()`` can be replaced by calling :func:`urllib.parse.parse_qs` - directly on the desired query string, except for ``multipart/form-data`` - input, which can be handled as described for ``cgi.parse_multipart()``. - -* ``cgi.parse_multipart()`` can be replaced with the functionality in the - :mod:`email` package (e.g. :class:`email.message.EmailMessage` and - :class:`email.message.Message`) which implements the same MIME RFCs, or - with the :pypi:`multipart` PyPI project. - -* ``cgi.parse_header()`` can be replaced with the functionality in the - :mod:`email` package, which implements the same MIME RFCs. For example, - with :class:`email.message.EmailMessage`:: - - from email.message import EmailMessage - msg = EmailMessage() - msg['content-type'] = 'application/json; charset="utf8"' - main, params = msg.get_content_type(), msg['content-type'].params +The last version of Python that provided the :mod:`!cgi` module was +`Python 3.12 `_. diff --git a/Doc/library/cgitb.rst b/Doc/library/cgitb.rst index 61401a03144e8e..96237cc6463489 100644 --- a/Doc/library/cgitb.rst +++ b/Doc/library/cgitb.rst @@ -9,4 +9,9 @@ This module is no longer part of the Python standard library. It was :ref:`removed in Python 3.13 ` after being deprecated in Python 3.11. The removal was decided in :pep:`594`. -A fork of the module on PyPI can be used instead: :pypi:`legacy-cgi`. +A fork of the module on PyPI can now be used instead: :pypi:`legacy-cgi`. +This is a copy of the cgi module, no longer maintained or supported by the core +Python team. + +The last version of Python that provided the :mod:`!cgitb` module was +`Python 3.12 `_. From 12c9405c9acc8ae25edea3f5f28abdf1b45874b8 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Sat, 9 Nov 2024 19:43:14 +0000 Subject: [PATCH 3/9] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Documentation/2024-11-09-19-43-10.gh-issue-none.YacfDc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Documentation/2024-11-09-19-43-10.gh-issue-none.YacfDc.rst diff --git a/Misc/NEWS.d/next/Documentation/2024-11-09-19-43-10.gh-issue-none.YacfDc.rst b/Misc/NEWS.d/next/Documentation/2024-11-09-19-43-10.gh-issue-none.YacfDc.rst new file mode 100644 index 00000000000000..1ea3438a2a65c4 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2024-11-09-19-43-10.gh-issue-none.YacfDc.rst @@ -0,0 +1 @@ +Added stub pages for removed modules explaining their removal, where to find replacements, and linking to the last Python version that supported them. From 7fcf16215468fe8e42dfeea8e820ad21dcacfaac Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 9 Nov 2024 15:13:01 -0500 Subject: [PATCH 4/9] fix the blurb name --- .../2024-11-09-19-43-10.gh-issue-126622.YacfDc.rst | 3 +++ .../Documentation/2024-11-09-19-43-10.gh-issue-none.YacfDc.rst | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Documentation/2024-11-09-19-43-10.gh-issue-126622.YacfDc.rst delete mode 100644 Misc/NEWS.d/next/Documentation/2024-11-09-19-43-10.gh-issue-none.YacfDc.rst diff --git a/Misc/NEWS.d/next/Documentation/2024-11-09-19-43-10.gh-issue-126622.YacfDc.rst b/Misc/NEWS.d/next/Documentation/2024-11-09-19-43-10.gh-issue-126622.YacfDc.rst new file mode 100644 index 00000000000000..a2181b5712873b --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2024-11-09-19-43-10.gh-issue-126622.YacfDc.rst @@ -0,0 +1,3 @@ +Added stub pages for removed modules explaining their removal, where to find +replacements, and linking to the last Python version that supported them. +Contributed by Ned Batchelder. diff --git a/Misc/NEWS.d/next/Documentation/2024-11-09-19-43-10.gh-issue-none.YacfDc.rst b/Misc/NEWS.d/next/Documentation/2024-11-09-19-43-10.gh-issue-none.YacfDc.rst deleted file mode 100644 index 1ea3438a2a65c4..00000000000000 --- a/Misc/NEWS.d/next/Documentation/2024-11-09-19-43-10.gh-issue-none.YacfDc.rst +++ /dev/null @@ -1 +0,0 @@ -Added stub pages for removed modules explaining their removal, where to find replacements, and linking to the last Python version that supported them. From b0ee909559ffbac4821b3b60e4a297d43be0e59e Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 9 Nov 2024 15:42:45 -0500 Subject: [PATCH 5/9] add deprecated-removed directives --- Doc/library/cgi.rst | 2 ++ Doc/library/cgitb.rst | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst index c7b3cee40f77f0..28885161bbd462 100644 --- a/Doc/library/cgi.rst +++ b/Doc/library/cgi.rst @@ -9,6 +9,8 @@ This module is no longer part of the Python standard library. It was :ref:`removed in Python 3.13 ` after being deprecated in Python 3.11. The removal was decided in :pep:`594`. +.. deprecated-removed:: 3.11 3.13 + A fork of the module on PyPI can be used instead: :pypi:`legacy-cgi`. This is a copy of the cgi module, no longer maintained or supported by the core Python team. diff --git a/Doc/library/cgitb.rst b/Doc/library/cgitb.rst index 96237cc6463489..e732e1cdb61a5d 100644 --- a/Doc/library/cgitb.rst +++ b/Doc/library/cgitb.rst @@ -9,6 +9,8 @@ This module is no longer part of the Python standard library. It was :ref:`removed in Python 3.13 ` after being deprecated in Python 3.11. The removal was decided in :pep:`594`. +.. deprecated-removed:: 3.11 3.13 + A fork of the module on PyPI can now be used instead: :pypi:`legacy-cgi`. This is a copy of the cgi module, no longer maintained or supported by the core Python team. From d789aa21b15c8dda03f6935faeb9ffc92cf9f4c6 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 10 Nov 2024 08:53:47 -0500 Subject: [PATCH 6/9] put the notice at the top --- Doc/library/cgi.rst | 4 ++-- Doc/library/cgitb.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst index 28885161bbd462..f9108fa954a906 100644 --- a/Doc/library/cgi.rst +++ b/Doc/library/cgi.rst @@ -5,12 +5,12 @@ :synopsis: Removed in 3.13. :deprecated: +.. deprecated-removed:: 3.11 3.13 + This module is no longer part of the Python standard library. It was :ref:`removed in Python 3.13 ` after being deprecated in Python 3.11. The removal was decided in :pep:`594`. -.. deprecated-removed:: 3.11 3.13 - A fork of the module on PyPI can be used instead: :pypi:`legacy-cgi`. This is a copy of the cgi module, no longer maintained or supported by the core Python team. diff --git a/Doc/library/cgitb.rst b/Doc/library/cgitb.rst index e732e1cdb61a5d..fc646aa4c48acd 100644 --- a/Doc/library/cgitb.rst +++ b/Doc/library/cgitb.rst @@ -5,12 +5,12 @@ :synopsis: Removed in 3.13. :deprecated: +.. deprecated-removed:: 3.11 3.13 + This module is no longer part of the Python standard library. It was :ref:`removed in Python 3.13 ` after being deprecated in Python 3.11. The removal was decided in :pep:`594`. -.. deprecated-removed:: 3.11 3.13 - A fork of the module on PyPI can now be used instead: :pypi:`legacy-cgi`. This is a copy of the cgi module, no longer maintained or supported by the core Python team. From 5716d0ef3f048643b24c5bc593a6c1c17bbbe6b5 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 10 Nov 2024 11:46:05 -0500 Subject: [PATCH 7/9] add the rest of the PEP 594 modules --- Doc/library/aifc.rst | 15 +++++++++++++++ Doc/library/asynchat.rst | 17 +++++++++++++++++ Doc/library/asyncore.rst | 17 +++++++++++++++++ Doc/library/audioop.rst | 15 +++++++++++++++ Doc/library/chunk.rst | 15 +++++++++++++++ Doc/library/crypt.rst | 20 ++++++++++++++++++++ Doc/library/imghdr.rst | 19 +++++++++++++++++++ Doc/library/mailcap.rst | 15 +++++++++++++++ Doc/library/msilib.rst | 15 +++++++++++++++ Doc/library/nis.rst | 15 +++++++++++++++ Doc/library/nntplib.rst | 15 +++++++++++++++ Doc/library/ossaudiodev.rst | 15 +++++++++++++++ Doc/library/pipes.rst | 17 +++++++++++++++++ Doc/library/removed.rst | 20 ++++++++++++++++++++ Doc/library/smtpd.rst | 18 ++++++++++++++++++ Doc/library/sndhdr.rst | 19 +++++++++++++++++++ Doc/library/spwd.rst | 18 ++++++++++++++++++ Doc/library/sunau.rst | 15 +++++++++++++++ Doc/library/telnetlib.rst | 19 +++++++++++++++++++ Doc/library/uu.rst | 15 +++++++++++++++ Doc/library/xdrlib.rst | 15 +++++++++++++++ Doc/whatsnew/3.12.rst | 2 ++ 22 files changed, 351 insertions(+) create mode 100644 Doc/library/aifc.rst create mode 100644 Doc/library/asynchat.rst create mode 100644 Doc/library/asyncore.rst create mode 100644 Doc/library/audioop.rst create mode 100644 Doc/library/chunk.rst create mode 100644 Doc/library/crypt.rst create mode 100644 Doc/library/imghdr.rst create mode 100644 Doc/library/mailcap.rst create mode 100644 Doc/library/msilib.rst create mode 100644 Doc/library/nis.rst create mode 100644 Doc/library/nntplib.rst create mode 100644 Doc/library/ossaudiodev.rst create mode 100644 Doc/library/pipes.rst create mode 100644 Doc/library/smtpd.rst create mode 100644 Doc/library/sndhdr.rst create mode 100644 Doc/library/spwd.rst create mode 100644 Doc/library/sunau.rst create mode 100644 Doc/library/telnetlib.rst create mode 100644 Doc/library/uu.rst create mode 100644 Doc/library/xdrlib.rst diff --git a/Doc/library/aifc.rst b/Doc/library/aifc.rst new file mode 100644 index 00000000000000..a756d679036ecb --- /dev/null +++ b/Doc/library/aifc.rst @@ -0,0 +1,15 @@ +:mod:`!aifc` --- Read and write AIFF and AIFC files +=================================================== + +.. module:: aifc + :synopsis: Removed in 3.13. + :deprecated: + +.. deprecated-removed:: 3.11 3.13 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +The last version of Python that provided the :mod:`!aifc` module was +`Python 3.12 `_. diff --git a/Doc/library/asynchat.rst b/Doc/library/asynchat.rst new file mode 100644 index 00000000000000..5e5c3a99fe66f1 --- /dev/null +++ b/Doc/library/asynchat.rst @@ -0,0 +1,17 @@ +:mod:`!asynchat` --- Asynchronous socket command/response handler +================================================================= + +.. module:: asynchat + :synopsis: Removed in 3.12. + :deprecated: + +.. deprecated-removed:: 3.6 3.12 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.12 ` after +being deprecated in Python 3.6. The removal was decided in :pep:`594`. + +Applications should use the :mod:`asyncio` module instead. + +The last version of Python that provided the :mod:`!asynchat` module was +`Python 3.11 `_. diff --git a/Doc/library/asyncore.rst b/Doc/library/asyncore.rst new file mode 100644 index 00000000000000..22c9881c3cca36 --- /dev/null +++ b/Doc/library/asyncore.rst @@ -0,0 +1,17 @@ +:mod:`!asyncore` --- Asynchronous socket handler +================================================ + +.. module:: asyncore + :synopsis: Removed in 3.12. + :deprecated: + +.. deprecated-removed:: 3.6 3.12 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.12 ` after +being deprecated in Python 3.6. The removal was decided in :pep:`594`. + +Applications should use the :mod:`asyncio` module instead. + +The last version of Python that provided the :mod:`!asyncore` module was +`Python 3.11 `_. diff --git a/Doc/library/audioop.rst b/Doc/library/audioop.rst new file mode 100644 index 00000000000000..3bc580b0bd3433 --- /dev/null +++ b/Doc/library/audioop.rst @@ -0,0 +1,15 @@ +:mod:`!audioop` --- Manipulate raw audio data +============================================= + +.. module:: audioop + :synopsis: Removed in 3.13. + :deprecated: + +.. deprecated-removed:: 3.11 3.13 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +The last version of Python that provided the :mod:`!audioop` module was +`Python 3.12 `_. diff --git a/Doc/library/chunk.rst b/Doc/library/chunk.rst new file mode 100644 index 00000000000000..9950a0ea70649a --- /dev/null +++ b/Doc/library/chunk.rst @@ -0,0 +1,15 @@ +:mod:`!chunk` --- Read IFF chunked data +======================================= + +.. module:: chunk + :synopsis: Removed in 3.13. + :deprecated: + +.. deprecated-removed:: 3.11 3.13 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +The last version of Python that provided the :mod:`!chunk` module was +`Python 3.12 `_. diff --git a/Doc/library/crypt.rst b/Doc/library/crypt.rst new file mode 100644 index 00000000000000..9ff37196ccf69f --- /dev/null +++ b/Doc/library/crypt.rst @@ -0,0 +1,20 @@ +:mod:`!crypt` --- Function to check Unix passwords +================================================== + +.. module:: crypt + :synopsis: Removed in 3.13. + :deprecated: + +.. deprecated-removed:: 3.11 3.13 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +Applications can use the :mod:`hashlib` module from the standard library. +Other possible replacements are third-party libraries from PyPI: +:pypi:`legacycrypt`, :pypi:`bcrypt`, :pypi:`argon2-cffi`, or :pypi:`passlib`. +These are not supported or maintained by the Python core team. + +The last version of Python that provided the :mod:`!crypt` module was +`Python 3.12 `_. diff --git a/Doc/library/imghdr.rst b/Doc/library/imghdr.rst new file mode 100644 index 00000000000000..56f26355f42558 --- /dev/null +++ b/Doc/library/imghdr.rst @@ -0,0 +1,19 @@ +:mod:`!imghdr` --- Determine the type of an image +================================================= + +.. module:: imghdr + :synopsis: Removed in 3.13. + :deprecated: + +.. deprecated-removed:: 3.11 3.13 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +Possible replacements are third-party libraries from PyPI: +:pypi:`filetype`, :pypi:`puremagic`, or :pypi:`python-magic`. +These are not supported or maintained by the Python core team. + +The last version of Python that provided the :mod:`!imghdr` module was +`Python 3.12 `_. diff --git a/Doc/library/mailcap.rst b/Doc/library/mailcap.rst new file mode 100644 index 00000000000000..4467da146a5a05 --- /dev/null +++ b/Doc/library/mailcap.rst @@ -0,0 +1,15 @@ +:mod:`!mailcap` --- Mailcap file handling +========================================= + +.. module:: mailcap + :synopsis: Removed in 3.13. + :deprecated: + +.. deprecated-removed:: 3.11 3.13 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +The last version of Python that provided the :mod:`!mailcap` module was +`Python 3.12 `_. diff --git a/Doc/library/msilib.rst b/Doc/library/msilib.rst new file mode 100644 index 00000000000000..eb1ac551ded456 --- /dev/null +++ b/Doc/library/msilib.rst @@ -0,0 +1,15 @@ +:mod:`!msilib` --- Read and write Microsoft Installer files +=========================================================== + +.. module:: msilib + :synopsis: Removed in 3.13. + :deprecated: + +.. deprecated-removed:: 3.11 3.13 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +The last version of Python that provided the :mod:`!msilib` module was +`Python 3.12 `_. diff --git a/Doc/library/nis.rst b/Doc/library/nis.rst new file mode 100644 index 00000000000000..dcc36dd43fc313 --- /dev/null +++ b/Doc/library/nis.rst @@ -0,0 +1,15 @@ +:mod:`!nis` --- Interface to Sun’s NIS (Yellow Pages) +===================================================== + +.. module:: nis + :synopsis: Removed in 3.13. + :deprecated: + +.. deprecated-removed:: 3.11 3.13 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +The last version of Python that provided the :mod:`!nis` module was +`Python 3.12 `_. diff --git a/Doc/library/nntplib.rst b/Doc/library/nntplib.rst new file mode 100644 index 00000000000000..8053fe8cb8b9e1 --- /dev/null +++ b/Doc/library/nntplib.rst @@ -0,0 +1,15 @@ +:mod:`!nntplib` --- NNTP protocol client +======================================== + +.. module:: nntplib + :synopsis: Removed in 3.13. + :deprecated: + +.. deprecated-removed:: 3.11 3.13 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +The last version of Python that provided the :mod:`!nntplib` module was +`Python 3.12 `_. diff --git a/Doc/library/ossaudiodev.rst b/Doc/library/ossaudiodev.rst new file mode 100644 index 00000000000000..320adbeff82539 --- /dev/null +++ b/Doc/library/ossaudiodev.rst @@ -0,0 +1,15 @@ +:mod:`!ossaudiodev` --- Access to OSS-compatible audio devices +============================================================== + +.. module:: ossaudiodev + :synopsis: Removed in 3.13. + :deprecated: + +.. deprecated-removed:: 3.11 3.13 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +The last version of Python that provided the :mod:`!ossaudiodev` module was +`Python 3.12 `_. diff --git a/Doc/library/pipes.rst b/Doc/library/pipes.rst new file mode 100644 index 00000000000000..d9bcc3a5d99c9b --- /dev/null +++ b/Doc/library/pipes.rst @@ -0,0 +1,17 @@ +:mod:`!pipes` --- Interface to shell pipelines +============================================== + +.. module:: pipes + :synopsis: Removed in 3.13. + :deprecated: + +.. deprecated-removed:: 3.11 3.13 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +Applications should use the :mod:`subprocess` module instead. + +The last version of Python that provided the :mod:`!pipes` module was +`Python 3.12 `_. diff --git a/Doc/library/removed.rst b/Doc/library/removed.rst index e463e3e88e24d0..3e90e3bff0e3f5 100644 --- a/Doc/library/removed.rst +++ b/Doc/library/removed.rst @@ -13,5 +13,25 @@ standard library. They are documented here to help people find replacements. .. toctree:: :maxdepth: 1 + aifc.rst + asynchat.rst + asyncore.rst + audioop.rst cgi.rst cgitb.rst + chunk.rst + crypt.rst + imghdr.rst + mailcap.rst + msilib.rst + nis.rst + nntplib.rst + ossaudiodev.rst + pipes.rst + smtpd.rst + sndhdr.rst + spwd.rst + sunau.rst + telnetlib.rst + uu.rst + xdrlib.rst diff --git a/Doc/library/smtpd.rst b/Doc/library/smtpd.rst new file mode 100644 index 00000000000000..c704f4a241b469 --- /dev/null +++ b/Doc/library/smtpd.rst @@ -0,0 +1,18 @@ +:mod:`!smtpd` --- SMTP Server +============================= + +.. module:: smtpd + :synopsis: Removed in 3.12. + :deprecated: + +.. deprecated-removed:: 3.6 3.12 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.12 ` after +being deprecated in Python 3.6. The removal was decided in :pep:`594`. + +A possible replacement is the third-party :pypi:`aiosmtpd` library. This +library is not maintained or supported by the Python core team. + +The last version of Python that provided the :mod:`!smtpd` module was +`Python 3.11 `_. diff --git a/Doc/library/sndhdr.rst b/Doc/library/sndhdr.rst new file mode 100644 index 00000000000000..6b71db4f6338a8 --- /dev/null +++ b/Doc/library/sndhdr.rst @@ -0,0 +1,19 @@ +:mod:`!sndhdr` --- Determine type of sound file +=============================================== + +.. module:: sndhdr + :synopsis: Removed in 3.13. + :deprecated: + +.. deprecated-removed:: 3.11 3.13 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +Possible replacements are third-party modules from PyPI: +:pypi:`filetype`, :pypi:`puremagic`, or :pypi:`python-magic`. +These are not supported or maintained by the Python core team. + +The last version of Python that provided the :mod:`!sndhdr` module was +`Python 3.12 `_. diff --git a/Doc/library/spwd.rst b/Doc/library/spwd.rst new file mode 100644 index 00000000000000..c16854bb380e52 --- /dev/null +++ b/Doc/library/spwd.rst @@ -0,0 +1,18 @@ +:mod:`!spwd` --- The shadow password database +============================================= + +.. module:: spwd + :synopsis: Removed in 3.13. + :deprecated: + +.. deprecated-removed:: 3.11 3.13 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +A possible replacement is the third-party library :pypi:`python-pam`. +This library is not supported or maintained by the Python core team. + +The last version of Python that provided the :mod:`!spwd` module was +`Python 3.12 `_. diff --git a/Doc/library/sunau.rst b/Doc/library/sunau.rst new file mode 100644 index 00000000000000..feb7768f8bdd68 --- /dev/null +++ b/Doc/library/sunau.rst @@ -0,0 +1,15 @@ +:mod:`!sunau` --- Read and write Sun AU files +============================================= + +.. module:: sunau + :synopsis: Removed in 3.13. + :deprecated: + +.. deprecated-removed:: 3.11 3.13 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +The last version of Python that provided the :mod:`!sunau` module was +`Python 3.12 `_. diff --git a/Doc/library/telnetlib.rst b/Doc/library/telnetlib.rst new file mode 100644 index 00000000000000..6971ad33ff9751 --- /dev/null +++ b/Doc/library/telnetlib.rst @@ -0,0 +1,19 @@ +:mod:`!telnetlib` --- Telnet client +=================================== + +.. module:: telnetlib + :synopsis: Removed in 3.13. + :deprecated: + +.. deprecated-removed:: 3.11 3.13 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +Possible replacements are third-party libraries from PyPI: :pypi:`telnetlib3` +or :pypi:`Exscript`. These are not supported or maintained by the Python core +team. + +The last version of Python that provided the :mod:`!telnetlib` module was +`Python 3.12 `_. diff --git a/Doc/library/uu.rst b/Doc/library/uu.rst new file mode 100644 index 00000000000000..0636d180294d47 --- /dev/null +++ b/Doc/library/uu.rst @@ -0,0 +1,15 @@ +:mod:`!uu` --- Encode and decode uuencode files +=============================================== + +.. module:: uu + :synopsis: Removed in 3.13. + :deprecated: + +.. deprecated-removed:: 3.11 3.13 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +The last version of Python that provided the :mod:`!uu` module was +`Python 3.12 `_. diff --git a/Doc/library/xdrlib.rst b/Doc/library/xdrlib.rst new file mode 100644 index 00000000000000..59b801c8e4072e --- /dev/null +++ b/Doc/library/xdrlib.rst @@ -0,0 +1,15 @@ +:mod:`!xdrlib` --- Encode and decode XDR data +============================================= + +.. module:: xdrlib + :synopsis: Removed in 3.13. + :deprecated: + +.. deprecated-removed:: 3.11 3.13 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.13 ` after +being deprecated in Python 3.11. The removal was decided in :pep:`594`. + +The last version of Python that provided the :mod:`!xdrlib` module was +`Python 3.12 `_. diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index d691185cb1ffc5..9204af46c15192 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -1341,6 +1341,8 @@ Deprecated .. include:: ../deprecations/pending-removal-in-future.rst +.. _whatsnew312-removed: + Removed ======= From e6dafd060e3515fc7a66dde617ab2c7c6c6951d0 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 10 Nov 2024 13:15:34 -0500 Subject: [PATCH 8/9] add distutils and imp to the removed section --- Doc/library/distutils.rst | 17 +++++++++++++++++ Doc/library/imp.rst | 15 +++++++++++++++ Doc/library/removed.rst | 2 ++ 3 files changed, 34 insertions(+) create mode 100644 Doc/library/distutils.rst create mode 100644 Doc/library/imp.rst diff --git a/Doc/library/distutils.rst b/Doc/library/distutils.rst new file mode 100644 index 00000000000000..6c439ecd2be56e --- /dev/null +++ b/Doc/library/distutils.rst @@ -0,0 +1,17 @@ +:mod:`!distutils` --- Building and installing Python modules +============================================================ + +.. module:: distutils + :synopsis: Removed in 3.12. + :deprecated: + +.. deprecated-removed:: 3.10 3.12 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.12 ` after +being deprecated in Python 3.10. The removal was decided in :pep:`632`, +which has `migration advice +`_. + +The last version of Python that provided the :mod:`!distutils` module was +`Python 3.11 `_. diff --git a/Doc/library/imp.rst b/Doc/library/imp.rst new file mode 100644 index 00000000000000..eb78f1a71e7e7a --- /dev/null +++ b/Doc/library/imp.rst @@ -0,0 +1,15 @@ +:mod:`!imp` --- Access the import internals +=========================================== + +.. module:: imp + :synopsis: Removed in 3.12. + :deprecated: + +.. deprecated-removed:: 3.4 3.12 + +This module is no longer part of the Python standard library. +It was :ref:`removed in Python 3.12 ` after +being deprecated in Python 3.4. + +The last version of Python that provided the :mod:`!imp` module was +`Python 3.11 `_. diff --git a/Doc/library/removed.rst b/Doc/library/removed.rst index 3e90e3bff0e3f5..4d75842eca1a03 100644 --- a/Doc/library/removed.rst +++ b/Doc/library/removed.rst @@ -21,7 +21,9 @@ standard library. They are documented here to help people find replacements. cgitb.rst chunk.rst crypt.rst + distutils.rst imghdr.rst + imp.rst mailcap.rst msilib.rst nis.rst From 002be8791839d27522f17064d5c7c67e9efc2330 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 11 Nov 2024 08:18:21 -0500 Subject: [PATCH 9/9] mention imp replacements --- Doc/library/distutils.rst | 2 +- Doc/library/imp.rst | 5 ++++- Doc/whatsnew/3.12.rst | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Doc/library/distutils.rst b/Doc/library/distutils.rst index 6c439ecd2be56e..af63e035bf3c4a 100644 --- a/Doc/library/distutils.rst +++ b/Doc/library/distutils.rst @@ -8,7 +8,7 @@ .. deprecated-removed:: 3.10 3.12 This module is no longer part of the Python standard library. -It was :ref:`removed in Python 3.12 ` after +It was :ref:`removed in Python 3.12 ` after being deprecated in Python 3.10. The removal was decided in :pep:`632`, which has `migration advice `_. diff --git a/Doc/library/imp.rst b/Doc/library/imp.rst index eb78f1a71e7e7a..3dc4c568b1ae2f 100644 --- a/Doc/library/imp.rst +++ b/Doc/library/imp.rst @@ -8,8 +8,11 @@ .. deprecated-removed:: 3.4 3.12 This module is no longer part of the Python standard library. -It was :ref:`removed in Python 3.12 ` after +It was :ref:`removed in Python 3.12 ` after being deprecated in Python 3.4. +The :ref:`removal notice ` includes guidance for +migrating code from :mod:`!imp` to :mod:`importlib`. + The last version of Python that provided the :mod:`!imp` module was `Python 3.11 `_. diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index 9204af46c15192..4fffc78a237791 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -1368,6 +1368,8 @@ configparser * :class:`configparser.ConfigParser` no longer has a ``readfp`` method. Use :meth:`~configparser.ConfigParser.read_file` instead. +.. _whatsnew312-removed-distutils: + distutils --------- @@ -1449,6 +1451,8 @@ importlib * ``importlib.abc.Finder``, ``pkgutil.ImpImporter``, and ``pkgutil.ImpLoader`` have been removed. (Contributed by Barry Warsaw in :gh:`98040`.) +.. _whatsnew312-removed-imp: + imp ---