@@ -65,13 +65,23 @@ Summary -- Release highlights
6565
6666.. PEP-sized items next.
6767
68+ Important deprecations, removals or restrictions:
69+
70+ * :ref: `PEP 594 <whatsnew313-pep594 >`: The remaining 19 "dead batteries"
71+ have been removed from the standard library:
72+ :mod: `!aifc `, :mod: `!audioop `, :mod: `!cgi `, :mod: `!cgitb `, :mod: `!chunk `,
73+ :mod: `!crypt `, :mod: `!imghdr `, :mod: `!mailcap `, :mod: `!msilib `, :mod: `!nis `,
74+ :mod: `!nntplib `, :mod: `!ossaudiodev `, :mod: `!pipes `, :mod: `!sndhdr `, :mod: `!spwd `,
75+ :mod: `!sunau `, :mod: `!telnetlib `, :mod: `!uu ` and :mod: `!xdrlib `.
76+
6877* :pep: `602 ` ("Annual Release Cycle for Python") has been updated:
6978
7079 * Python 3.9 - 3.12 have one and a half years of full support,
7180 followed by three and a half years of security fixes.
7281 * Python 3.13 and later have two years of full support,
7382 followed by three years of security fixes.
7483
84+
7585New Features
7686============
7787
@@ -690,10 +700,123 @@ although there is currently no date scheduled for their removal.
690700Removed
691701=======
692702
693- * :pep: `594 `: Remove the :mod: `!telnetlib ` module, deprecated in Python 3.11:
694- use the projects `telnetlib3 <https://pypi.org/project/telnetlib3/ >`_ or
695- `Exscript <https://pypi.org/project/Exscript/ >`_ instead.
696- (Contributed by Victor Stinner in :gh: `104773 `.)
703+ .. _whatsnew313-pep594 :
704+
705+ PEP 594: dead batteries
706+ -----------------------
707+
708+ * :pep: `594 ` removed 19 modules from the standard library,
709+ deprecated in Python 3.11:
710+
711+ * :mod: `!aifc `.
712+ (Contributed by Victor Stinner in :gh: `104773 `.)
713+
714+ * :mod: `!audioop `.
715+ (Contributed by Victor Stinner in :gh: `104773 `.)
716+
717+ * :mod: `!chunk `.
718+ (Contributed by Victor Stinner in :gh: `104773 `.)
719+
720+ * :mod: `!cgi ` and :mod: `!cgitb `.
721+
722+ * ``cgi.FieldStorage `` can typically be replaced with
723+ :func: `urllib.parse.parse_qsl ` for ``GET `` and ``HEAD `` requests,
724+ and the :mod: `email.message ` module or `multipart
725+ <https://pypi.org/project/multipart/> `__ PyPI project for ``POST `` and
726+ ``PUT ``.
727+
728+ * ``cgi.parse() `` can be replaced by calling :func: `urllib.parse.parse_qs `
729+ directly on the desired query string, except for ``multipart/form-data ``
730+ input, which can be handled as described for ``cgi.parse_multipart() ``.
731+
732+ * ``cgi.parse_header() `` can be replaced with the functionality in the
733+ :mod: `email ` package, which implements the same MIME RFCs. For example,
734+ with :class: `email.message.EmailMessage `::
735+
736+ from email.message import EmailMessage
737+ msg = EmailMessage()
738+ msg['content-type'] = 'application/json; charset="utf8"'
739+ main, params = msg.get_content_type(), msg['content-type'].params
740+
741+ * ``cgi.parse_multipart() `` can be replaced with the functionality in the
742+ :mod: `email ` package (e.g. :class: `email.message.EmailMessage ` and
743+ :class: `email.message.Message `) which implements the same MIME RFCs, or
744+ with the `multipart <https://pypi.org/project/multipart/ >`__ PyPI project.
745+
746+ (Contributed by Victor Stinner in :gh: `104773 `.)
747+
748+ * :mod: `!crypt ` module and its private :mod: `!_crypt ` extension.
749+ The :mod: `hashlib ` module is a potential replacement for certain use cases.
750+ Otherwise, the following PyPI projects can be used:
751+
752+ * `bcrypt <https://pypi.org/project/bcrypt/ >`_:
753+ Modern password hashing for your software and your servers.
754+ * `passlib <https://pypi.org/project/passlib/ >`_:
755+ Comprehensive password hashing framework supporting over 30 schemes.
756+ * `argon2-cffi <https://pypi.org/project/argon2-cffi/ >`_:
757+ The secure Argon2 password hashing algorithm.
758+ * `legacycrypt <https://pypi.org/project/legacycrypt/ >`_:
759+ Wrapper to the POSIX crypt library call and associated functionality.
760+
761+ (Contributed by Victor Stinner in :gh: `104773 `.)
762+
763+ * :mod: `!imghdr `: use the projects
764+ `filetype <https://pypi.org/project/filetype/ >`_,
765+ `puremagic <https://pypi.org/project/puremagic/ >`_,
766+ or `python-magic <https://pypi.org/project/python-magic/ >`_ instead.
767+ (Contributed by Victor Stinner in :gh: `104773 `.)
768+
769+ * :mod: `!mailcap `.
770+ The :mod: `mimetypes ` module provides an alternative.
771+ (Contributed by Victor Stinner in :gh: `104773 `.)
772+
773+ * :mod: `!msilib `.
774+ (Contributed by Zachary Ware in :gh: `104773 `.)
775+
776+ * :mod: `!nis `.
777+ (Contributed by Victor Stinner in :gh: `104773 `.)
778+
779+ * :mod: `!nntplib `:
780+ the `PyPI nntplib project <https://pypi.org/project/nntplib/ >`_
781+ can be used instead.
782+ (Contributed by Victor Stinner in :gh: `104773 `.)
783+
784+ * :mod: `!ossaudiodev `: use the
785+ `pygame project <https://www.pygame.org/ >`_ for audio playback.
786+ (Contributed by Victor Stinner in :gh: `104780 `.)
787+
788+ * :mod: `!pipes `: use the :mod: `subprocess ` module instead.
789+ (Contributed by Victor Stinner in :gh: `104773 `.)
790+
791+ * :mod: `!sndhdr `: use the projects
792+ `filetype <https://pypi.org/project/filetype/ >`_,
793+ `puremagic <https://pypi.org/project/puremagic/ >`_, or
794+ `python-magic <https://pypi.org/project/python-magic/ >`_ instead.
795+ (Contributed by Victor Stinner in :gh: `104773 `.)
796+
797+ * :mod: `!spwd `:
798+ the `python-pam project <https://pypi.org/project/python-pam/ >`_
799+ can be used instead.
800+ (Contributed by Victor Stinner in :gh: `104773 `.)
801+
802+ * :mod: `!sunau `.
803+ (Contributed by Victor Stinner in :gh: `104773 `.)
804+
805+ * :mod: `!telnetlib `, use the projects
806+ `telnetlib3 <https://pypi.org/project/telnetlib3/ >`_ or
807+ `Exscript <https://pypi.org/project/Exscript/ >`_ instead.
808+ (Contributed by Victor Stinner in :gh: `104773 `.)
809+
810+ * :mod: `!uu `: the :mod: `base64 ` module is a modern alternative.
811+ (Contributed by Victor Stinner in :gh: `104773 `.)
812+
813+ * :mod: `!xdrlib `.
814+ (Contributed by Victor Stinner in :gh: `104773 `.)
815+
816+ * Remove support for the keyword-argument method of creating
817+ :class: `typing.TypedDict ` types, deprecated in Python 3.11.
818+ (Contributed by Tomas Roun in :gh: `104786 `.)
819+
697820
698821* Remove the ``2to3 `` program and the :mod: `!lib2to3 ` module,
699822 deprecated in Python 3.11.
@@ -735,115 +858,6 @@ Removed
735858
736859 (Contributed by Hugo van Kemenade in :gh: `104835 `.)
737860
738- * :pep: `594 `: Remove the :mod: `!cgi ` and :mod: `!cgitb ` modules,
739- deprecated in Python 3.11.
740-
741- * ``cgi.FieldStorage `` can typically be replaced with
742- :func: `urllib.parse.parse_qsl ` for ``GET `` and ``HEAD `` requests, and the
743- :mod: `email.message ` module or `multipart
744- <https://pypi.org/project/multipart/> `__ PyPI project for ``POST `` and
745- ``PUT ``.
746-
747- * ``cgi.parse() `` can be replaced by calling :func: `urllib.parse.parse_qs `
748- directly on the desired query string, except for ``multipart/form-data ``
749- input, which can be handled as described for ``cgi.parse_multipart() ``.
750-
751- * ``cgi.parse_multipart() `` can be replaced with the functionality in the
752- :mod: `email ` package (e.g. :class: `email.message.EmailMessage ` and
753- :class: `email.message.Message `) which implements the same MIME RFCs, or
754- with the `multipart <https://pypi.org/project/multipart/ >`__ PyPI project.
755-
756- * ``cgi.parse_header() `` can be replaced with the functionality in the
757- :mod: `email ` package, which implements the same MIME RFCs. For example,
758- with :class: `email.message.EmailMessage `::
759-
760- from email.message import EmailMessage
761- msg = EmailMessage()
762- msg['content-type'] = 'application/json; charset="utf8"'
763- main, params = msg.get_content_type(), msg['content-type'].params
764-
765- (Contributed by Victor Stinner in :gh: `104773 `.)
766-
767- * :pep: `594 `: Remove the :mod: `!sndhdr ` module, deprecated in Python 3.11: use
768- the projects `filetype <https://pypi.org/project/filetype/ >`_, `puremagic
769- <https://pypi.org/project/puremagic/> `_, or `python-magic
770- <https://pypi.org/project/python-magic/> `_ instead.
771- (Contributed by Victor Stinner in :gh: `104773 `.)
772-
773- * :pep: `594 `: Remove the :mod: `!pipes ` module, deprecated in Python 3.11:
774- use the :mod: `subprocess ` module instead.
775- (Contributed by Victor Stinner in :gh: `104773 `.)
776-
777- * :pep: `594 `: Remove the :mod: `!ossaudiodev ` module, deprecated in Python 3.11:
778- use the `pygame project <https://www.pygame.org/ >`_ for audio playback.
779- (Contributed by Victor Stinner in :gh: `104780 `.)
780-
781- * :pep: `594 `: Remove the :mod: `!sunau ` module, deprecated in Python 3.11.
782- (Contributed by Victor Stinner in :gh: `104773 `.)
783-
784- * :pep: `594 `: Remove the :mod: `!mailcap ` module, deprecated in Python 3.11.
785- The :mod: `mimetypes ` module provides an alternative.
786- (Contributed by Victor Stinner in :gh: `104773 `.)
787-
788- * :pep: `594 `: Remove the :mod: `!spwd ` module, deprecated in Python 3.11:
789- the `python-pam project <https://pypi.org/project/python-pam/ >`_ can be used
790- instead.
791- (Contributed by Victor Stinner in :gh: `104773 `.)
792-
793- * :pep: `594 `: Remove the :mod: `!nntplib ` module, deprecated in Python 3.11:
794- the `PyPI nntplib project <https://pypi.org/project/nntplib/ >`_ can be used
795- instead.
796- (Contributed by Victor Stinner in :gh: `104773 `.)
797-
798- * :pep: `594 `: Remove the :mod: `!nis ` module, deprecated in Python 3.11.
799- (Contributed by Victor Stinner in :gh: `104773 `.)
800-
801- * :pep: `594 `: Remove the :mod: `!xdrlib ` module, deprecated in Python 3.11.
802- (Contributed by Victor Stinner in :gh: `104773 `.)
803-
804- * :pep: `594 `: Remove the :mod: `!msilib ` module, deprecated in Python 3.11.
805- (Contributed by Zachary Ware in :gh: `104773 `.)
806-
807- * :pep: `594 `: Remove the :mod: `!crypt ` module and its private :mod: `!_crypt `
808- extension, deprecated in Python 3.11.
809- The :mod: `hashlib ` module is a potential replacement for certain use cases.
810- Otherwise, the following PyPI projects can be used:
811-
812- * `bcrypt <https://pypi.org/project/bcrypt/ >`_:
813- Modern password hashing for your software and your servers.
814- * `passlib <https://pypi.org/project/passlib/ >`_:
815- Comprehensive password hashing framework supporting over 30 schemes.
816- * `argon2-cffi <https://pypi.org/project/argon2-cffi/ >`_:
817- The secure Argon2 password hashing algorithm.
818- * `legacycrypt <https://pypi.org/project/legacycrypt/ >`_:
819- Wrapper to the POSIX crypt library call and associated functionality.
820-
821- (Contributed by Victor Stinner in :gh: `104773 `.)
822-
823- * :pep: `594 `: Remove the :mod: `!uu ` module, deprecated in Python 3.11:
824- the :mod: `base64 ` module is a modern alternative.
825- (Contributed by Victor Stinner in :gh: `104773 `.)
826-
827- * :pep: `594 `: Remove the :mod: `!aifc ` module, deprecated in Python 3.11.
828- (Contributed by Victor Stinner in :gh: `104773 `.)
829-
830- * :pep: `594 `: Remove the :mod: `!audioop ` module, deprecated in Python 3.11.
831- (Contributed by Victor Stinner in :gh: `104773 `.)
832-
833- * :pep: `594 `: Remove the :mod: `!chunk ` module, deprecated in Python 3.11.
834- (Contributed by Victor Stinner in :gh: `104773 `.)
835-
836- * Remove support for the keyword-argument method of creating
837- :class: `typing.TypedDict ` types, deprecated in Python 3.11.
838- (Contributed by Tomas Roun in :gh: `104786 `.)
839-
840- * :pep: `594 `: Remove the :mod: `!imghdr ` module, deprecated in Python 3.11:
841- use the projects
842- `filetype <https://pypi.org/project/filetype/ >`_,
843- `puremagic <https://pypi.org/project/puremagic/ >`_,
844- or `python-magic <https://pypi.org/project/python-magic/ >`_ instead.
845- (Contributed by Victor Stinner in :gh: `104773 `.)
846-
847861* Remove the untested and undocumented :meth: `!unittest.TestProgram.usageExit `
848862 method, deprecated in Python 3.11.
849863 (Contributed by Hugo van Kemenade in :gh: `104992 `.)
0 commit comments