by module name. Consult the :file:`Misc/NEWS` file in the source tree for a more
complete list of changes, or look through the CVS logs for all the details.
-* The :mod:`asyncore` module's :func:`loop` function now has a *count* parameter
+* The :mod:`!asyncore` module's :func:`!loop` function now has a *count* parameter
that lets you perform a limited number of passes through the polling loop. The
default is still to loop forever.
:file:`Misc/NEWS` file in the source tree for a more complete list of
changes, or look through the Subversion logs for all the details.
-* The :mod:`asyncore` and :mod:`asynchat` modules are
+* The :mod:`!asyncore` and :mod:`!asynchat` modules are
being actively maintained again, and a number of patches and bugfixes
were applied. (Maintained by Josiah Carlson; see :issue:`1736190` for
one patch.)
(Contributed by Yaroslav Pankovych in :issue:`21041`.)
Add :meth:`Path.hardlink_to <pathlib.Path.hardlink_to>` method that
-supersedes :meth:`~pathlib.Path.link_to`. The new method has the same argument
+supersedes :meth:`!link_to`. The new method has the same argument
order as :meth:`~pathlib.Path.symlink_to`.
(Contributed by Barney Gale in :issue:`39950`.)
(Contributed by Jelle Zijlstra in :gh:`87889`.)
-* :meth:`pathlib.Path.link_to` is deprecated and slated for removal in
+* :meth:`!pathlib.Path.link_to` is deprecated and slated for removal in
Python 3.12. Use :meth:`pathlib.Path.hardlink_to` instead.
(Contributed by Barney Gale in :issue:`39950`.)
* NPN features like :meth:`ssl.SSLSocket.selected_npn_protocol` and
:meth:`ssl.SSLContext.set_npn_protocols` are replaced by ALPN.
-* The threading debug (:envvar:`PYTHONTHREADDEBUG` environment variable) is
+* The threading debug (:envvar:`!PYTHONTHREADDEBUG` environment variable) is
deprecated in Python 3.10 and will be removed in Python 3.12. This feature
requires a :ref:`debug build of Python <debug-build>`.
(Contributed by Victor Stinner in :issue:`44584`.)
(Contributed by Brett Cannon in :issue:`47061` and Victor Stinner in
:gh:`68966`.)
-* The :mod:`asynchat`, :mod:`asyncore` and :mod:`smtpd` modules have been
+* The :mod:`!asynchat`, :mod:`!asyncore` and :mod:`!smtpd` modules have been
deprecated since at least Python 3.6. Their documentation and deprecation
warnings have now been updated to note they will be removed in Python 3.12.
(Contributed by Hugo van Kemenade in :issue:`47022`.)
C APIs pending removal are
:ref:`listed separately <whatsnew311-c-api-pending-removal>`.
-* The :mod:`asynchat` module
-* The :mod:`asyncore` module
+* The :mod:`!asynchat` module
+* The :mod:`!asyncore` module
* The :ref:`entire distutils package <distutils-deprecated>`
* The :mod:`!imp` module
* The :class:`typing.io <typing.IO>` namespace
* :func:`!importlib.util.set_package_wrapper`
* :class:`!pkgutil.ImpImporter`
* :class:`!pkgutil.ImpLoader`
-* :meth:`pathlib.Path.link_to`
+* :meth:`!pathlib.Path.link_to`
* :func:`!sqlite3.enable_shared_cache`
* :func:`!sqlite3.OptimizedUnicode`
-* :envvar:`PYTHONTHREADDEBUG` environment variable
+* :envvar:`!PYTHONTHREADDEBUG` environment variable
* The following deprecated aliases in :mod:`unittest`:
============================ =============================== ===============
because it was not used and added by mistake in previous versions.
(Contributed by Nikita Sobolev in :issue:`46483`.)
-* Removed the :class:`!MailmanProxy` class in the :mod:`smtpd` module,
+* Removed the :class:`!MailmanProxy` class in the :mod:`!smtpd` module,
as it is unusable without the external :mod:`!mailman` package.
(Contributed by Donghee Na in :issue:`35800`.)
asyncore
--------
-:class:`asyncore.dispatcher` now provides a
-:meth:`~asyncore.dispatcher.handle_accepted()` method
+:class:`!asyncore.dispatcher` now provides a
+:meth:`!handle_accepted()` method
returning a ``(sock, addr)`` pair which is called when a connection has actually
been established with a new remote endpoint. This is supposed to be used as a
-replacement for old :meth:`~asyncore.dispatcher.handle_accept()` and avoids
-the user to call :meth:`~asyncore.dispatcher.accept()` directly.
+replacement for old :meth:`!handle_accept()` and avoids
+the user to call :meth:`!accept()` directly.
(Contributed by Giampaolo RodolĂ ; :issue:`6706`.)
thread-state aware APIs (such as :c:func:`PyEval_SaveThread`
and :c:func:`PyEval_RestoreThread`) should be used instead.
-* Due to security risks, :func:`asyncore.handle_accept` has been deprecated, and
- a new function, :func:`asyncore.handle_accepted`, was added to replace it.
+* Due to security risks, :func:`!asyncore.handle_accept` has been deprecated, and
+ a new function, :func:`!asyncore.handle_accepted`, was added to replace it.
(Contributed by Giampaolo Rodola in :issue:`6706`.)
smtpd
-----
-The :mod:`smtpd` module now supports :rfc:`5321` (extended SMTP) and :rfc:`1870`
+The :mod:`!smtpd` module now supports :rfc:`5321` (extended SMTP) and :rfc:`1870`
(size extension). Per the standard, these extensions are enabled if and only
if the client initiates the session with an ``EHLO`` command.
smtpd
-----
-The :class:`~smtpd.SMTPServer` and :class:`~smtpd.SMTPChannel` classes now
+The :class:`!SMTPServer` and :class:`!SMTPChannel` classes now
accept a *map* keyword argument which, if specified, is passed in to
-:class:`asynchat.async_chat` as its *map* argument. This allows an application
+:class:`!asynchat.async_chat` as its *map* argument. This allows an application
to avoid affecting the global socket map. (Contributed by Vinay Sajip in
:issue:`11959`.)
:issue:`18011`.) Note: this change was also inadvertently applied in Python
3.3.3.
-* The :attr:`~cgi.FieldStorage.file` attribute is now automatically closed when
+* The :attr:`!file` attribute is now automatically closed when
the creating :class:`!cgi.FieldStorage` instance is garbage collected. If you
were pulling the file object out separately from the :class:`!cgi.FieldStorage`
instance and not keeping the instance alive, then you should either store the
cgi
---
-The :class:`~cgi.FieldStorage` class now supports the :term:`context manager`
+The :class:`!FieldStorage` class now supports the :term:`context manager`
protocol. (Contributed by Berker Peksag in :issue:`20289`.)
smtpd
-----
-Both the :class:`~smtpd.SMTPServer` and :class:`~smtpd.SMTPChannel` classes now
+Both the :class:`!SMTPServer` and :class:`!SMTPChannel` classes now
accept a *decode_data* keyword argument to determine if the ``DATA`` portion of
the SMTP transaction is decoded using the ``"utf-8"`` codec or is instead
provided to the
-:meth:`SMTPServer.process_message() <smtpd.SMTPServer.process_message>`
+:meth:`!SMTPServer.process_message()`
method as a byte string. The default is ``True`` for backward compatibility
reasons, but will change to ``False`` in Python 3.6. If *decode_data* is set
to ``False``, the ``process_message`` method must be prepared to accept keyword
arguments.
(Contributed by Maciej Szulik in :issue:`19662`.)
-The :class:`~smtpd.SMTPServer` class now advertises the ``8BITMIME`` extension
+The :class:`!SMTPServer` class now advertises the ``8BITMIME`` extension
(:rfc:`6152`) if *decode_data* has been set ``True``. If the client
specifies ``BODY=8BITMIME`` on the ``MAIL`` command, it is passed to
-:meth:`SMTPServer.process_message() <smtpd.SMTPServer.process_message>`
+:meth:`!SMTPServer.process_message()`
via the *mail_options* keyword.
(Contributed by Milan Oberkirch and R. David Murray in :issue:`21795`.)
-The :class:`~smtpd.SMTPServer` class now also supports the ``SMTPUTF8``
+The :class:`!SMTPServer` class now also supports the ``SMTPUTF8``
extension (:rfc:`6531`: Internationalized Email). If the client specified
``SMTPUTF8 BODY=8BITMIME`` on the ``MAIL`` command, they are passed to
-:meth:`SMTPServer.process_message() <smtpd.SMTPServer.process_message>`
+:meth:`!SMTPServer.process_message()`
via the *mail_options* keyword. It is the responsibility of the
``process_message`` method to correctly handle the ``SMTPUTF8`` data.
(Contributed by Milan Oberkirch in :issue:`21725`.)
It is now possible to provide, directly or via name resolution, IPv6
-addresses in the :class:`~smtpd.SMTPServer` constructor, and have it
+addresses in the :class:`!SMTPServer` constructor, and have it
successfully connect. (Contributed by Milan Oberkirch in :issue:`14758`.)
sndhdr
------
-The :func:`~sndhdr.what` and :func:`~sndhdr.whathdr` functions now return
+The :func:`!what` and :func:`!whathdr` functions now return
a :func:`~collections.namedtuple`. (Contributed by Claudiu Popa in
:issue:`18615`.)
The :func:`asyncio.async` function is deprecated in favor of
:func:`~asyncio.ensure_future`.
-The :mod:`smtpd` module has in the past always decoded the DATA portion of
+The :mod:`!smtpd` module has in the past always decoded the DATA portion of
email messages using the ``utf-8`` codec. This can now be controlled by the
-new *decode_data* keyword to :class:`~smtpd.SMTPServer`. The default value is
+new *decode_data* keyword to :class:`!SMTPServer`. The default value is
``True``, but this default is deprecated. Specify the *decode_data* keyword
with an appropriate value to avoid the deprecation warning.
asynchat
~~~~~~~~
-The :mod:`asynchat` has been deprecated in favor of :mod:`asyncio`.
+The :mod:`!asynchat` has been deprecated in favor of :mod:`asyncio`.
(Contributed by Mariatta in :issue:`25002`.)
asyncore
~~~~~~~~
-The :mod:`asyncore` has been deprecated in favor of :mod:`asyncio`.
+The :mod:`!asyncore` has been deprecated in favor of :mod:`asyncio`.
(Contributed by Mariatta in :issue:`25002`.)
:mod:`calendar`, :mod:`!cgi`, :mod:`csv`,
:mod:`~xml.etree.ElementTree`, :mod:`enum`,
:mod:`fileinput`, :mod:`ftplib`, :mod:`logging`, :mod:`mailbox`,
- :mod:`mimetypes`, :mod:`optparse`, :mod:`plistlib`, :mod:`smtpd`,
+ :mod:`mimetypes`, :mod:`optparse`, :mod:`plistlib`, :mod:`!smtpd`,
:mod:`subprocess`, :mod:`tarfile`, :mod:`threading` and
:mod:`wave`. This means they will export new symbols when ``import *``
is used.
an error (e.g. ``EBADF``) was reported by the underlying system call.
(Contributed by Martin Panter in :issue:`26685`.)
-* The *decode_data* argument for the :class:`smtpd.SMTPChannel` and
- :class:`smtpd.SMTPServer` constructors is now ``False`` by default.
+* The *decode_data* argument for the :class:`!smtpd.SMTPChannel` and
+ :class:`!smtpd.SMTPServer` constructors is now ``False`` by default.
This means that the argument passed to
- :meth:`~smtpd.SMTPServer.process_message` is now a bytes object by
- default, and ``process_message()`` will be passed keyword arguments.
+ :meth:`!process_message` is now a bytes object by
+ default, and :meth:`!process_message` will be passed keyword arguments.
Code that has already been updated in accordance with the deprecation
warning generated by 3.5 will not be affected.
* The :attr:`struct.Struct.format` type is now :class:`str` instead of
:class:`bytes`. (Contributed by Victor Stinner in :issue:`21071`.)
-* :func:`~cgi.parse_multipart` now accepts the *encoding* and *errors*
+* :func:`!cgi.parse_multipart` now accepts the *encoding* and *errors*
arguments and returns the same results as
- :class:`~FieldStorage`: for non-file fields, the value associated to a key
+ :class:`!FieldStorage`: for non-file fields, the value associated to a key
is a list of strings, not bytes.
(Contributed by Pierre Quentel in :issue:`29979`.)
contain characters unrepresentable at the OS level.
(Contributed by Serhiy Storchaka in :issue:`33721`.)
-Added :meth:`pathlib.Path.link_to()` which creates a hard link pointing
+Added :meth:`!pathlib.Path.link_to()` which creates a hard link pointing
to a path.
(Contributed by Joannah Nanjekye in :issue:`26978`)
Note that ``link_to`` was deprecated in 3.10 and removed in 3.12 in
* Passing ``None`` as the first argument to the :func:`shlex.split` function
has been deprecated. (Contributed by Zackery Spytz in :issue:`33262`.)
-* :func:`smtpd.MailmanProxy` is now deprecated as it is unusable without
+* :func:`!smtpd.MailmanProxy` is now deprecated as it is unusable without
an external module, ``mailman``. (Contributed by Samuel Colvin in :issue:`35800`.)
* The :mod:`!lib2to3` module now emits a :exc:`PendingDeprecationWarning`.
.. nonce: BE7zbu
.. section: Library
-Fix `cgi.parse_multipart` without content_length. Patch by Roger Duran
+Fix ``cgi.parse_multipart`` without content_length. Patch by Roger Duran
..
.. nonce: qKnSqV
.. section: Core and Builtins
-The threading debug (:envvar:`PYTHONTHREADDEBUG` environment variable) is
+The threading debug (:envvar:`!PYTHONTHREADDEBUG` environment variable) is
deprecated in Python 3.10 and will be removed in Python 3.12. This feature
requires a debug build of Python. Patch by Victor Stinner.
.. nonce: 3hmkWw
.. section: Library
-:class:`smtpd.MailmanProxy` is now removed as it is unusable without an
+:class:`!smtpd.MailmanProxy` is now removed as it is unusable without an
external module, ``mailman``. Patch by Donghee Na.
..
.. nonce: uaEDcI
.. section: Library
-The :mod:`asynchat`, :mod:`asyncore` and :mod:`smtpd` modules have been
+The :mod:`!asynchat`, :mod:`!asyncore` and :mod:`!smtpd` modules have been
deprecated since at least Python 3.6. Their documentation and deprecation
warnings and have now been updated to note they will removed in Python 3.12
(:pep:`594`).
.. section: Tests
A test case for :func:`os.sendfile` is converted from deprecated
-:mod:`asyncore` (see :pep:`594`) to :mod:`asyncio`. Patch by Oleg Iarygin.
+:mod:`!asyncore` (see :pep:`594`) to :mod:`asyncio`. Patch by Oleg Iarygin.
..
.. nonce: uw6x5z
.. section: Library
-The :mod:`smtpd` module was removed per the schedule in :pep:`594`.
+The :mod:`!smtpd` module was removed per the schedule in :pep:`594`.
..
.. nonce: jUpzF3
.. section: Library
-Remove modules :mod:`asyncore` and :mod:`asynchat`, which were deprecated by
+Remove modules :mod:`!asyncore` and :mod:`!asynchat`, which were deprecated by
:pep:`594`.
..
.. nonce: V4kNN3
.. section: Library
-The `crypt` module now internally uses the `crypt_r()` library function
-instead of `crypt()` when available.
+The ``crypt`` module now internally uses the ``crypt_r()`` library function
+instead of ``crypt()`` when available.
..
.. nonce: Lpm-SI
.. section: Library
-`pathlib.path.link_to()` is now implemented. It creates a hard link pointing
+``pathlib.path.link_to()`` is now implemented. It creates a hard link pointing
to a path.
..