Skip to content

Commit

Permalink
pythongh-101100: Fix Sphinx warnings for removed dead batteries (pyth…
Browse files Browse the repository at this point in the history
…on#113669)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
2 people authored and Glyphack committed Jan 27, 2024
1 parent 4ac88aa commit 0c81680
Show file tree
Hide file tree
Showing 19 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion Doc/whatsnew/2.4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ fixes. Here's a partial list of the most notable changes, sorted alphabetically
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.

Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/2.6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1789,7 +1789,7 @@ changes, sorted alphabetically by module name. Consult the
: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.)
Expand Down
6 changes: 3 additions & 3 deletions Doc/whatsnew/3.10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ Add negative indexing support to :attr:`PurePath.parents
(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`.)
Expand Down Expand Up @@ -1740,7 +1740,7 @@ Deprecated
(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`.)
Expand Down Expand Up @@ -1771,7 +1771,7 @@ Deprecated
* 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`.)
Expand Down
12 changes: 6 additions & 6 deletions Doc/whatsnew/3.11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1747,7 +1747,7 @@ Modules
(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`.)
Expand Down Expand Up @@ -1877,8 +1877,8 @@ and will be removed in Python 3.12.
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
Expand All @@ -1902,10 +1902,10 @@ C APIs pending removal are
* :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`:

============================ =============================== ===============
Expand Down Expand Up @@ -2007,7 +2007,7 @@ Removed C APIs are :ref:`listed separately <whatsnew311-c-api-removed>`.
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`.)

Expand Down
12 changes: 6 additions & 6 deletions Doc/whatsnew/3.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1858,12 +1858,12 @@ structure.
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`.)

Expand Down Expand Up @@ -2737,8 +2737,8 @@ require changes to your code:
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`.)

Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1845,7 +1845,7 @@ signal
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.

Expand Down
6 changes: 3 additions & 3 deletions Doc/whatsnew/3.4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1369,9 +1369,9 @@ error. (Contributed by Atsuo Ishimoto and Hynek Schlawack in
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`.)

Expand Down Expand Up @@ -2370,7 +2370,7 @@ Changes in the Python API
: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
Expand Down
22 changes: 11 additions & 11 deletions Doc/whatsnew/3.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ size of decompressed data. (Contributed by Nikolaus Rath in :issue:`15955`.)
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`.)


Expand Down Expand Up @@ -1663,34 +1663,34 @@ during debugging, instead of integer "magic numbers".
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`.)


Expand All @@ -1714,7 +1714,7 @@ support :rfc:`6531` (SMTPUTF8).
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`.)

Expand Down Expand Up @@ -2296,9 +2296,9 @@ slated for removal in Python 3.6.
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.

Expand Down
14 changes: 7 additions & 7 deletions Doc/whatsnew/3.6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1961,14 +1961,14 @@ Deprecated Python modules, functions and methods
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`.)


Expand Down Expand Up @@ -2189,7 +2189,7 @@ Changes in the Python API
: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.
Expand Down Expand Up @@ -2219,11 +2219,11 @@ Changes in the Python API
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.

Expand Down
4 changes: 2 additions & 2 deletions Doc/whatsnew/3.7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2304,9 +2304,9 @@ Changes in the Python API
* 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`.)

Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,7 @@ pathlib
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
Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.9.rst
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ Deprecated
* 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`.
Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.10.0a1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2527,7 +2527,7 @@ in Python 3.4 and removed in Python 3.5.
.. 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

..
Expand Down
4 changes: 2 additions & 2 deletions Misc/NEWS.d/3.11.0a1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ always available when needed. Patch by Mark Shannon.
.. 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.

Expand Down Expand Up @@ -2808,7 +2808,7 @@ behaves differently than the similar implementation in :mod:`sysconfig`.
.. 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.

..
Expand Down
4 changes: 2 additions & 2 deletions Misc/NEWS.d/3.11.0a7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ Fix :class:`asyncio.Semaphore` re-aquiring FIFO order.
.. 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`).
Expand Down Expand Up @@ -1324,7 +1324,7 @@ extensions.
.. 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.

..
Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.12.0a1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3617,7 +3617,7 @@ allow access to handlers by name.
.. 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`.

..

Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.12.0a2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ Make sure ``patch.dict()`` can be applied on async functions.
.. 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`.

..
Expand Down
4 changes: 2 additions & 2 deletions Misc/NEWS.d/3.8.0a1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2006,8 +2006,8 @@ Improved support of custom data descriptors in :func:`help` and
.. 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.

..

Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.8.0a4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ all tags in a namespace. Patch by Stefan Behnel.
.. 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.

..
Expand Down

0 comments on commit 0c81680

Please sign in to comment.