gh-101100: Fix Sphinx warnings in `whatsnew/3.9.rst` (#118364)

This commit is contained in:
Hugo van Kemenade 2024-04-28 20:31:22 +03:00 committed by GitHub
parent c618d53a3a
commit e0ab642436
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 37 additions and 37 deletions

View File

@ -669,8 +669,8 @@ include:
* The new :func:`asyncio.current_task` function returns the currently running * The new :func:`asyncio.current_task` function returns the currently running
:class:`~asyncio.Task` instance, and the new :func:`asyncio.all_tasks` :class:`~asyncio.Task` instance, and the new :func:`asyncio.all_tasks`
function returns a set of all existing ``Task`` instances in a given loop. function returns a set of all existing ``Task`` instances in a given loop.
The :meth:`Task.current_task() <asyncio.Task.current_task>` and The :meth:`!Task.current_task` and
:meth:`Task.all_tasks() <asyncio.Task.all_tasks>` methods have been deprecated. :meth:`!Task.all_tasks` methods have been deprecated.
(Contributed by Andrew Svetlov in :issue:`32250`.) (Contributed by Andrew Svetlov in :issue:`32250`.)
* The new *provisional* :class:`~asyncio.BufferedProtocol` class allows * The new *provisional* :class:`~asyncio.BufferedProtocol` class allows
@ -1969,7 +1969,7 @@ asynchronous context manager must be used in order to acquire and release
the synchronization resource. the synchronization resource.
(Contributed by Andrew Svetlov in :issue:`32253`.) (Contributed by Andrew Svetlov in :issue:`32253`.)
The :meth:`asyncio.Task.current_task` and :meth:`asyncio.Task.all_tasks` The :meth:`!asyncio.Task.current_task` and :meth:`!asyncio.Task.all_tasks`
methods have been deprecated. methods have been deprecated.
(Contributed by Andrew Svetlov in :issue:`32250`.) (Contributed by Andrew Svetlov in :issue:`32250`.)

View File

@ -81,13 +81,13 @@ Interpreter improvements:
* a number of Python builtins (range, tuple, set, frozenset, list, dict) are * a number of Python builtins (range, tuple, set, frozenset, list, dict) are
now sped up using :pep:`590` vectorcall; now sped up using :pep:`590` vectorcall;
* garbage collection does not block on resurrected objects; * garbage collection does not block on resurrected objects;
* a number of Python modules (:mod:`_abc`, :mod:`!audioop`, :mod:`_bz2`, * a number of Python modules (:mod:`!_abc`, :mod:`!audioop`, :mod:`!_bz2`,
:mod:`_codecs`, :mod:`_contextvars`, :mod:`!_crypt`, :mod:`_functools`, :mod:`!_codecs`, :mod:`!_contextvars`, :mod:`!_crypt`, :mod:`!_functools`,
:mod:`_json`, :mod:`_locale`, :mod:`math`, :mod:`operator`, :mod:`resource`, :mod:`!_json`, :mod:`!_locale`, :mod:`math`, :mod:`operator`, :mod:`resource`,
:mod:`time`, :mod:`_weakref`) now use multiphase initialization as defined :mod:`time`, :mod:`!_weakref`) now use multiphase initialization as defined
by PEP 489; by PEP 489;
* a number of standard library modules (:mod:`!audioop`, :mod:`ast`, :mod:`grp`, * a number of standard library modules (:mod:`!audioop`, :mod:`ast`, :mod:`grp`,
:mod:`_hashlib`, :mod:`pwd`, :mod:`_posixsubprocess`, :mod:`random`, :mod:`!_hashlib`, :mod:`pwd`, :mod:`!_posixsubprocess`, :mod:`random`,
:mod:`select`, :mod:`struct`, :mod:`termios`, :mod:`zlib`) are now using :mod:`select`, :mod:`struct`, :mod:`termios`, :mod:`zlib`) are now using
the stable ABI defined by PEP 384. the stable ABI defined by PEP 384.
@ -203,7 +203,7 @@ The :mod:`ast` module uses the new parser and produces the same AST as
the old parser. the old parser.
In Python 3.10, the old parser will be deleted and so will all In Python 3.10, the old parser will be deleted and so will all
functionality that depends on it (primarily the :mod:`parser` module, functionality that depends on it (primarily the :mod:`!parser` module,
which has long been deprecated). In Python 3.9 *only*, you can switch which has long been deprecated). In Python 3.9 *only*, you can switch
back to the LL(1) parser using a command line switch (``-X back to the LL(1) parser using a command line switch (``-X
oldparser``) or an environment variable (``PYTHONOLDPARSER=1``). oldparser``) or an environment variable (``PYTHONOLDPARSER=1``).
@ -366,7 +366,7 @@ wait until the cancellation is complete also in the case when *timeout* is
<= 0, like it does with positive timeouts. <= 0, like it does with positive timeouts.
(Contributed by Elvis Pranskevichus in :issue:`32751`.) (Contributed by Elvis Pranskevichus in :issue:`32751`.)
:mod:`asyncio` now raises :exc:`TyperError` when calling incompatible :mod:`asyncio` now raises :exc:`TypeError` when calling incompatible
methods with an :class:`ssl.SSLSocket` socket. methods with an :class:`ssl.SSLSocket` socket.
(Contributed by Ido Michael in :issue:`37404`.) (Contributed by Ido Michael in :issue:`37404`.)
@ -589,7 +589,7 @@ a non-blocking socket. (Contributed by Donghee Na in :issue:`39259`.)
os os
-- --
Added :const:`~os.CLD_KILLED` and :const:`~os.CLD_STOPPED` for :attr:`si_code`. Added :const:`~os.CLD_KILLED` and :const:`~os.CLD_STOPPED` for :attr:`!si_code`.
(Contributed by Donghee Na in :issue:`38493`.) (Contributed by Donghee Na in :issue:`38493`.)
Exposed the Linux-specific :func:`os.pidfd_open` (:issue:`38692`) and Exposed the Linux-specific :func:`os.pidfd_open` (:issue:`38692`) and
@ -861,7 +861,7 @@ Deprecated
Python versions it will raise a :exc:`TypeError` for all floats. Python versions it will raise a :exc:`TypeError` for all floats.
(Contributed by Serhiy Storchaka in :issue:`37315`.) (Contributed by Serhiy Storchaka in :issue:`37315`.)
* The :mod:`parser` and :mod:`symbol` modules are deprecated and will be * The :mod:`!parser` and :mod:`!symbol` modules are deprecated and will be
removed in future versions of Python. For the majority of use cases, removed in future versions of Python. For the majority of use cases,
users can leverage the Abstract Syntax Tree (AST) generation and compilation users can leverage the Abstract Syntax Tree (AST) generation and compilation
stage, using the :mod:`ast` module. stage, using the :mod:`ast` module.
@ -889,7 +889,7 @@ Deprecated
it for writing and silencing a warning. it for writing and silencing a warning.
(Contributed by Serhiy Storchaka in :issue:`28286`.) (Contributed by Serhiy Storchaka in :issue:`28286`.)
* Deprecated the ``split()`` method of :class:`_tkinter.TkappType` in * Deprecated the ``split()`` method of :class:`!_tkinter.TkappType` in
favour of the ``splitlist()`` method which has more consistent and favour of the ``splitlist()`` method which has more consistent and
predicable behavior. predicable behavior.
(Contributed by Serhiy Storchaka in :issue:`38371`.) (Contributed by Serhiy Storchaka in :issue:`38371`.)
@ -898,11 +898,11 @@ Deprecated
deprecated and will be removed in version 3.11. deprecated and will be removed in version 3.11.
(Contributed by Yury Selivanov and Kyle Stanley in :issue:`34790`.) (Contributed by Yury Selivanov and Kyle Stanley in :issue:`34790`.)
* binhex4 and hexbin4 standards are now deprecated. The :mod:`binhex` module * binhex4 and hexbin4 standards are now deprecated. The :mod:`!binhex` module
and the following :mod:`binascii` functions are now deprecated: and the following :mod:`binascii` functions are now deprecated:
* :func:`~binascii.b2a_hqx`, :func:`~binascii.a2b_hqx` * :func:`!b2a_hqx`, :func:`!a2b_hqx`
* :func:`~binascii.rlecode_hqx`, :func:`~binascii.rledecode_hqx` * :func:`!rlecode_hqx`, :func:`!rledecode_hqx`
(Contributed by Victor Stinner in :issue:`39353`.) (Contributed by Victor Stinner in :issue:`39353`.)
@ -950,7 +950,7 @@ Deprecated
Removed Removed
======= =======
* The erroneous version at :data:`unittest.mock.__version__` has been removed. * The erroneous version at :data:`!unittest.mock.__version__` has been removed.
* :class:`!nntplib.NNTP`: ``xpath()`` and ``xgtitle()`` methods have been removed. * :class:`!nntplib.NNTP`: ``xpath()`` and ``xgtitle()`` methods have been removed.
These methods are deprecated since Python 3.3. Generally, these extensions These methods are deprecated since Python 3.3. Generally, these extensions
@ -987,7 +987,7 @@ Removed
removed. They were deprecated since Python 3.7. removed. They were deprecated since Python 3.7.
(Contributed by Victor Stinner in :issue:`37320`.) (Contributed by Victor Stinner in :issue:`37320`.)
* The :meth:`~threading.Thread.isAlive()` method of :class:`threading.Thread` * The :meth:`!isAlive()` method of :class:`threading.Thread`
has been removed. It was deprecated since Python 3.8. has been removed. It was deprecated since Python 3.8.
Use :meth:`~threading.Thread.is_alive()` instead. Use :meth:`~threading.Thread.is_alive()` instead.
(Contributed by Donghee Na in :issue:`37804`.) (Contributed by Donghee Na in :issue:`37804`.)
@ -1035,7 +1035,7 @@ Removed
``asyncio.Condition`` and ``asyncio.Semaphore``. ``asyncio.Condition`` and ``asyncio.Semaphore``.
(Contributed by Andrew Svetlov in :issue:`34793`.) (Contributed by Andrew Svetlov in :issue:`34793`.)
* The :func:`sys.getcounts` function, the ``-X showalloccount`` command line * The :func:`!sys.getcounts` function, the ``-X showalloccount`` command line
option and the ``show_alloc_count`` field of the C structure option and the ``show_alloc_count`` field of the C structure
:c:type:`PyConfig` have been removed. They required a special Python build by :c:type:`PyConfig` have been removed. They required a special Python build by
defining ``COUNT_ALLOCS`` macro. defining ``COUNT_ALLOCS`` macro.
@ -1046,11 +1046,11 @@ Removed
the ``__annotations__`` attribute instead. the ``__annotations__`` attribute instead.
(Contributed by Serhiy Storchaka in :issue:`40182`.) (Contributed by Serhiy Storchaka in :issue:`40182`.)
* The :meth:`symtable.SymbolTable.has_exec` method has been removed. It was * The :meth:`!symtable.SymbolTable.has_exec` method has been removed. It was
deprecated since 2006, and only returning ``False`` when it's called. deprecated since 2006, and only returning ``False`` when it's called.
(Contributed by Batuhan Taskaya in :issue:`40208`) (Contributed by Batuhan Taskaya in :issue:`40208`)
* The :meth:`asyncio.Task.current_task` and :meth:`asyncio.Task.all_tasks` * The :meth:`!asyncio.Task.current_task` and :meth:`!asyncio.Task.all_tasks`
have been removed. They were deprecated since Python 3.7 and you can use have been removed. They were deprecated since Python 3.7 and you can use
:func:`asyncio.current_task` and :func:`asyncio.all_tasks` instead. :func:`asyncio.current_task` and :func:`asyncio.all_tasks` instead.
(Contributed by Rémi Lapeyre in :issue:`40967`) (Contributed by Rémi Lapeyre in :issue:`40967`)
@ -1230,7 +1230,7 @@ Build Changes
* The ``COUNT_ALLOCS`` special build macro has been removed. * The ``COUNT_ALLOCS`` special build macro has been removed.
(Contributed by Victor Stinner in :issue:`39489`.) (Contributed by Victor Stinner in :issue:`39489`.)
* On non-Windows platforms, the :c:func:`setenv` and :c:func:`unsetenv` * On non-Windows platforms, the :c:func:`!setenv` and :c:func:`!unsetenv`
functions are now required to build Python. functions are now required to build Python.
(Contributed by Victor Stinner in :issue:`39395`.) (Contributed by Victor Stinner in :issue:`39395`.)
@ -1319,7 +1319,7 @@ New Features
the garbage collector respectively. the garbage collector respectively.
(Contributed by Pablo Galindo Salgado in :issue:`40241`.) (Contributed by Pablo Galindo Salgado in :issue:`40241`.)
* Added :c:func:`_PyObject_FunctionStr` to get a user-friendly string * Added :c:func:`!_PyObject_FunctionStr` to get a user-friendly string
representation of a function-like object. representation of a function-like object.
(Patch by Jeroen Demeyer in :issue:`37645`.) (Patch by Jeroen Demeyer in :issue:`37645`.)
@ -1361,7 +1361,7 @@ Porting to Python 3.9
and refers to a constant string. and refers to a constant string.
(Contributed by Serhiy Storchaka in :issue:`38650`.) (Contributed by Serhiy Storchaka in :issue:`38650`.)
* The :c:type:`PyGC_Head` structure is now opaque. It is only defined in the * The :c:type:`!PyGC_Head` structure is now opaque. It is only defined in the
internal C API (``pycore_gc.h``). internal C API (``pycore_gc.h``).
(Contributed by Victor Stinner in :issue:`40241`.) (Contributed by Victor Stinner in :issue:`40241`.)
@ -1384,12 +1384,12 @@ Porting to Python 3.9
* :c:func:`PyObject_IS_GC` macro was converted to a function. * :c:func:`PyObject_IS_GC` macro was converted to a function.
* The :c:func:`PyObject_NEW` macro becomes an alias to the * The :c:func:`!PyObject_NEW` macro becomes an alias to the
:c:macro:`PyObject_New` macro, and the :c:func:`PyObject_NEW_VAR` macro :c:macro:`PyObject_New` macro, and the :c:func:`!PyObject_NEW_VAR` macro
becomes an alias to the :c:macro:`PyObject_NewVar` macro. They no longer becomes an alias to the :c:macro:`PyObject_NewVar` macro. They no longer
access directly the :c:member:`PyTypeObject.tp_basicsize` member. access directly the :c:member:`PyTypeObject.tp_basicsize` member.
* :c:func:`PyObject_GET_WEAKREFS_LISTPTR` macro was converted to a function: * :c:func:`!PyObject_GET_WEAKREFS_LISTPTR` macro was converted to a function:
the macro accessed directly the :c:member:`PyTypeObject.tp_weaklistoffset` the macro accessed directly the :c:member:`PyTypeObject.tp_weaklistoffset`
member. member.

View File

@ -1861,8 +1861,8 @@ bundled versions of ``pip`` and ``setuptools``. Patch by Krzysztof Konopko.
.. nonce: _dx3OO .. nonce: _dx3OO
.. section: Library .. section: Library
Removed :meth:`asyncio.Task.current_task` and Removed :meth:`!asyncio.Task.current_task` and
:meth:`asyncio.Task.all_tasks`. Patch contributed by Rémi Lapeyre. :meth:`!asyncio.Task.all_tasks`. Patch contributed by Rémi Lapeyre.
.. ..

View File

@ -7,7 +7,7 @@
:c:func:`Py_EndInterpreter` now explicitly untracks all objects currently :c:func:`Py_EndInterpreter` now explicitly untracks all objects currently
tracked by the GC. Previously, if an object was used later by another tracked by the GC. Previously, if an object was used later by another
interpreter, calling :c:func:`PyObject_GC_UnTrack` on the object crashed if interpreter, calling :c:func:`PyObject_GC_UnTrack` on the object crashed if
the previous or the next object of the :c:type:`PyGC_Head` structure became the previous or the next object of the :c:type:`!PyGC_Head` structure became
a dangling pointer. Patch by Victor Stinner. a dangling pointer. Patch by Victor Stinner.
.. ..

View File

@ -5616,7 +5616,7 @@ heap type
.. nonce: 4DcUaI .. nonce: 4DcUaI
.. section: C API .. section: C API
Add :c:func:`_PyObject_FunctionStr` to get a user-friendly string Add :c:func:`!_PyObject_FunctionStr` to get a user-friendly string
representation of a function-like object. Patch by Jeroen Demeyer. representation of a function-like object. Patch by Jeroen Demeyer.
.. ..

View File

@ -844,7 +844,7 @@ test.regrtest now can receive a list of test patterns to ignore (using the
.. nonce: cNsA7S .. nonce: cNsA7S
.. section: Build .. section: Build
:mod:`asyncio` now raises :exc:`TyperError` when calling incompatible :mod:`asyncio` now raises :exc:`TypeError` when calling incompatible
methods with an :class:`ssl.SSLSocket` socket. Patch by Ido Michael. methods with an :class:`ssl.SSLSocket` socket. Patch by Ido Michael.
.. ..

View File

@ -564,7 +564,7 @@ Implement traverse and clear slots in _abc._abc_data type.
.. nonce: 3rO_q7 .. nonce: 3rO_q7
.. section: Library .. section: Library
Remove deprecated :meth:`symtable.SymbolTable.has_exec`. Remove deprecated :meth:`!symtable.SymbolTable.has_exec`.
.. ..
@ -1118,7 +1118,7 @@ into an exit code.
.. nonce: _FOf7E .. nonce: _FOf7E
.. section: C API .. section: C API
Move the :c:type:`PyGC_Head` structure to the internal C API. Move the :c:type:`!PyGC_Head` structure to the internal C API.
.. ..
@ -1149,8 +1149,8 @@ the garbage collector respectively. Patch by Pablo Galindo.
.. nonce: Seuh3D .. nonce: Seuh3D
.. section: C API .. section: C API
The :c:func:`PyObject_NEW` macro becomes an alias to the The :c:func:`!PyObject_NEW` macro becomes an alias to the
:c:func:`PyObject_New` macro, and the :c:func:`PyObject_NEW_VAR` macro :c:func:`PyObject_New` macro, and the :c:func:`!PyObject_NEW_VAR` macro
becomes an alias to the :c:func:`PyObject_NewVar` macro, to hide becomes an alias to the :c:func:`PyObject_NewVar` macro, to hide
implementation details. They no longer access directly the implementation details. They no longer access directly the
:c:member:`PyTypeObject.tp_basicsize` member. :c:member:`PyTypeObject.tp_basicsize` member.
@ -1174,7 +1174,7 @@ used.
.. nonce: 6nFYbY .. nonce: 6nFYbY
.. section: C API .. section: C API
Convert the :c:func:`PyObject_GET_WEAKREFS_LISTPTR` macro to a function to Convert the :c:func:`!PyObject_GET_WEAKREFS_LISTPTR` macro to a function to
hide implementation details: the macro accessed directly to the hide implementation details: the macro accessed directly to the
:c:member:`PyTypeObject.tp_weaklistoffset` member. :c:member:`PyTypeObject.tp_weaklistoffset` member.