[3.12] gh-109190: What's New in 3.12: Add subheadings to removals for easy linking (GH-109159) (#109273)

gh-109190: What's New in 3.12: Add subheadings to removals for easy linking (GH-109159)
(cherry picked from commit 57b6205523)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2023-09-12 07:16:35 -07:00 committed by GitHub
parent 5305cdc39b
commit a8393dc27e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1274,13 +1274,19 @@ although there is currently no date scheduled for their removal.
Removed
=======
* ``asynchat`` and ``asyncore``: These two modules have been removed
asynchat and asyncore
---------------------
* These two modules have been removed
according to the schedule in :pep:`594`,
having been deprecated in Python 3.6.
Use :mod:`asyncio` instead.
(Contributed by Nikita Sobolev in :gh:`96580`.)
* :mod:`configparser`: Several names deprecated in the :mod:`configparser` way back in 3.2 have
configparser
------------
* Several names deprecated in the :mod:`configparser` way back in 3.2 have
been removed per :gh:`89336`:
* :class:`configparser.ParsingError` no longer has a ``filename`` attribute
@ -1290,13 +1296,19 @@ Removed
* :class:`configparser.ConfigParser` no longer has a ``readfp`` method.
Use :meth:`~configparser.ConfigParser.read_file` instead.
* ``distutils``: Remove the ``distutils`` package. It was deprecated in Python 3.10 by
distutils
---------
* Remove the :py:mod:`!distutils` package. It was deprecated in Python 3.10 by
:pep:`632` "Deprecate distutils module". For projects still using
``distutils`` and cannot be updated to something else, the ``setuptools``
project can be installed: it still provides ``distutils``.
(Contributed by Victor Stinner in :gh:`92584`.)
* :mod:`ensurepip`: Remove the bundled setuptools wheel from :mod:`ensurepip`,
ensurepip
---------
* Remove the bundled setuptools wheel from :mod:`ensurepip`,
and stop installing setuptools in environments created by :mod:`venv`.
``pip (>= 22.1)`` does not require setuptools to be installed in the
@ -1314,27 +1326,42 @@ Removed
(Contributed by Pradyun Gedam in :gh:`95299`.)
* :mod:`enum`: Remove ``EnumMeta.__getattr__``, which is no longer needed for
enum
----
* Remove :mod:`enum`'s ``EnumMeta.__getattr__``, which is no longer needed for
enum attribute access.
(Contributed by Ethan Furman in :gh:`95083`.)
* :mod:`ftplib`: Remove the ``FTP_TLS.ssl_version`` class attribute: use the
ftplib
------
* Remove :mod:`ftplib`'s ``FTP_TLS.ssl_version`` class attribute: use the
*context* parameter instead.
(Contributed by Victor Stinner in :gh:`94172`.)
* :mod:`gzip`: Remove the ``filename`` attribute of :class:`gzip.GzipFile`,
gzip
----
* Remove the ``filename`` attribute of :mod:`gzip`'s :class:`gzip.GzipFile`,
deprecated since Python 2.6, use the :attr:`~gzip.GzipFile.name` attribute
instead. In write mode, the ``filename`` attribute added ``'.gz'`` file
extension if it was not present.
(Contributed by Victor Stinner in :gh:`94196`.)
* :mod:`hashlib`: Remove the pure Python implementation of
hashlib
-------
* Remove the pure Python implementation of :mod:`hashlib`'s
:func:`hashlib.pbkdf2_hmac()`, deprecated in Python 3.10. Python 3.10 and
newer requires OpenSSL 1.1.1 (:pep:`644`): this OpenSSL version provides
a C implementation of :func:`~hashlib.pbkdf2_hmac()` which is faster.
(Contributed by Victor Stinner in :gh:`94199`.)
* :mod:`importlib`: Many previously deprecated cleanups in :mod:`importlib` have now been
importlib
---------
* Many previously deprecated cleanups in :mod:`importlib` have now been
completed:
* References to, and support for :meth:`!module_repr()` has been removed.
@ -1350,6 +1377,9 @@ Removed
* ``importlib.abc.Finder``, ``pkgutil.ImpImporter``, and ``pkgutil.ImpLoader``
have been removed. (Contributed by Barry Warsaw in :gh:`98040`.)
imp
---
* The :mod:`!imp` module has been removed. (Contributed by Barry Warsaw in
:gh:`98040`.)
@ -1400,13 +1430,19 @@ Removed
``PY_COMPILED``, ``C_EXTENSION``, ``PY_RESOURCE``, ``PKG_DIRECTORY``,
``C_BUILTIN``, ``PY_FROZEN``, ``PY_CODERESOURCE``, ``IMP_HOOK``.
* :mod:`io`: Remove ``io.OpenWrapper`` and ``_pyio.OpenWrapper``, deprecated in Python
io
--
* Remove :mod:`io`'s ``io.OpenWrapper`` and ``_pyio.OpenWrapper``, deprecated in Python
3.10: just use :func:`open` instead. The :func:`open` (:func:`io.open`)
function is a built-in function. Since Python 3.10, :func:`!_pyio.open` is
also a static method.
(Contributed by Victor Stinner in :gh:`94169`.)
* :mod:`locale`: Remove the :func:`!locale.format` function, deprecated in Python 3.7:
locale
------
* Remove :mod:`locale`'s :func:`!locale.format` function, deprecated in Python 3.7:
use :func:`locale.format_string` instead.
(Contributed by Victor Stinner in :gh:`94226`.)
@ -1418,7 +1454,10 @@ Removed
.. _aiosmtpd: https://pypi.org/project/aiosmtpd/
* :mod:`sqlite3`: The following undocumented :mod:`sqlite3` features, deprecated in Python
sqlite3
-------
* The following undocumented :mod:`sqlite3` features, deprecated in Python
3.10, are now removed:
* ``sqlite3.enable_shared_cache()``
@ -1434,9 +1473,10 @@ Removed
(Contributed by Erlend E. Aasland in :gh:`92548`.)
* :mod:`ssl`:
ssl
---
* Remove the :func:`!ssl.RAND_pseudo_bytes` function, deprecated in Python 3.6:
* Remove :mod:`ssl`'s :func:`!ssl.RAND_pseudo_bytes` function, deprecated in Python 3.6:
use :func:`os.urandom` or :func:`ssl.RAND_bytes` instead.
(Contributed by Victor Stinner in :gh:`94199`.)
@ -1455,9 +1495,12 @@ Removed
Validation.
(Contributed by Victor Stinner in :gh:`94199`.)
* :mod:`unittest`: Removed many old deprecated :mod:`unittest` features:
unittest
--------
- A number of :class:`~unittest.TestCase` method aliases:
* Removed many old deprecated :mod:`unittest` features:
* A number of :class:`~unittest.TestCase` method aliases:
============================ =============================== ===============
Deprecated alias Method Name Deprecated in
@ -1482,33 +1525,45 @@ Removed
You can use https://github.com/isidentical/teyit to automatically modernise
your unit tests.
- Undocumented and broken :class:`~unittest.TestCase` method
* Undocumented and broken :class:`~unittest.TestCase` method
``assertDictContainsSubset`` (deprecated in Python 3.2).
- Undocumented :meth:`TestLoader.loadTestsFromModule
* Undocumented :meth:`TestLoader.loadTestsFromModule
<unittest.TestLoader.loadTestsFromModule>` parameter *use_load_tests*
(deprecated and ignored since Python 3.2).
- An alias of the :class:`~unittest.TextTestResult` class:
* An alias of the :class:`~unittest.TextTestResult` class:
``_TextTestResult`` (deprecated in Python 3.2).
(Contributed by Serhiy Storchaka in :issue:`45162`.)
* :mod:`webbrowser`: Remove support for obsolete browsers from :mod:`webbrowser`.
webbrowser
----------
* Remove support for obsolete browsers from :mod:`webbrowser`.
Removed browsers include: Grail, Mosaic, Netscape, Galeon, Skipstone,
Iceape, Firebird, and Firefox versions 35 and below (:gh:`102871`).
* :mod:`xml.etree.ElementTree`: Remove the ``ElementTree.Element.copy()`` method of the
xml.etree.ElementTree
---------------------
* Remove the ``ElementTree.Element.copy()`` method of the
pure Python implementation, deprecated in Python 3.10, use the
:func:`copy.copy` function instead. The C implementation of :mod:`xml.etree.ElementTree`
has no ``copy()`` method, only a ``__copy__()`` method.
(Contributed by Victor Stinner in :gh:`94383`.)
* :mod:`zipimport`: Remove ``find_loader()`` and ``find_module()`` methods,
zipimport
---------
* Remove :mod:`zipimport`'s ``find_loader()`` and ``find_module()`` methods,
deprecated in Python 3.10: use the ``find_spec()`` method instead. See
:pep:`451` for the rationale.
(Contributed by Victor Stinner in :gh:`94379`.)
Others
------
* Removed the ``suspicious`` rule from the documentation Makefile, and
removed ``Doc/tools/rstlint.py``, both in favor of `sphinx-lint
<https://github.com/sphinx-contrib/sphinx-lint>`_.