Skip to content

Commit

Permalink
NEWS: Fix Sphinx warnings and increase threshold for new news nits (p…
Browse files Browse the repository at this point in the history
…ython#121482)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
hugovk and AlexWaygood authored Jul 8, 2024
1 parent 2be37ec commit 006b53a
Show file tree
Hide file tree
Showing 39 changed files with 110 additions and 106 deletions.
3 changes: 3 additions & 0 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@
('c:data', 'PyExc_UnicodeWarning'),
('c:data', 'PyExc_UserWarning'),
('c:data', 'PyExc_Warning'),
# Undocumented public C macros
('c:macro', 'Py_BUILD_ASSERT'),
('c:macro', 'Py_BUILD_ASSERT_EXPR'),
# Do not error nit-picky mode builds when _SubParsersAction.add_parser cannot
# be resolved, as the method is currently undocumented. For context, see
# https://github.com/python/cpython/pull/103289.
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/profile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ you are using :class:`profile.Profile` or :class:`cProfile.Profile`,
As the :class:`cProfile.Profile` class cannot be calibrated, custom timer
functions should be used with care and should be as fast as possible. For
the best results with a custom timer, it might be necessary to hard-code it
in the C source of the internal :mod:`_lsprof` module.
in the C source of the internal :mod:`!_lsprof` module.

Python 3.3 adds several new functions in :mod:`time` that can be used to make
precise measurements of process or wall-clock time. For example, see
Expand Down
2 changes: 1 addition & 1 deletion Doc/tools/check-warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from typing import TextIO

# Fail if NEWS nit found before this line number
NEWS_NIT_THRESHOLD = 200
NEWS_NIT_THRESHOLD = 1700

# Exclude these whether they're dirty or clean,
# because they trigger a rebuild of dirty files.
Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,7 @@ The dictionary returned by :meth:`.SSLSocket.getpeercert` contains additional
stat
----

The :mod:`stat` module is now backed by a C implementation in :mod:`_stat`. A C
The :mod:`stat` module is now backed by a C implementation in :mod:`!_stat`. A C
implementation is required as most of the values aren't standardized and
are platform-dependent. (Contributed by Christian Heimes in :issue:`11016`.)

Expand Down
4 changes: 2 additions & 2 deletions Doc/whatsnew/3.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1935,8 +1935,8 @@ specifying the namespace in which the code will be running.
tkinter
-------

The :mod:`tkinter._fix` module used for setting up the Tcl/Tk environment
on Windows has been replaced by a private function in the :mod:`_tkinter`
The :mod:`!tkinter._fix` module used for setting up the Tcl/Tk environment
on Windows has been replaced by a private function in the :mod:`!_tkinter`
module which makes no permanent changes to environment variables.
(Contributed by Zachary Ware in :issue:`20035`.)

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 @@ -2048,7 +2048,7 @@ The :mod:`macpath` is now deprecated and will be removed in Python 3.8.
threading
---------

:mod:`dummy_threading` and :mod:`_dummy_thread` have been deprecated. It is
:mod:`!dummy_threading` and :mod:`!_dummy_thread` have been deprecated. It is
no longer possible to build Python with threading disabled.
Use :mod:`threading` instead.
(Contributed by Antoine Pitrou in :issue:`31370`.)
Expand Down Expand Up @@ -2184,7 +2184,7 @@ The following features and APIs have been removed from Python 3.7:
``socket.socketpair`` on Python 3.5 and newer.

* :mod:`asyncio` no longer exports the :mod:`selectors` and
:mod:`_overlapped` modules as ``asyncio.selectors`` and
:mod:`!_overlapped` modules as ``asyncio.selectors`` and
``asyncio._overlapped``. Replace ``from asyncio import selectors`` with
``import selectors``.

Expand Down
2 changes: 1 addition & 1 deletion Misc/HISTORY
Original file line number Diff line number Diff line change
Expand Up @@ -3952,7 +3952,7 @@ Library
- Issue #18626: the inspect module now offers a basic command line
introspection interface (Initial patch by Claudiu Popa)

- Issue #3015: Fixed tkinter with wantobject=False. Any Tcl command call
- Issue #3015: Fixed tkinter with ``wantobjects=False``. Any Tcl command call
returned empty string.

- Issue #19037: The mailbox module now makes all changes to maildir files
Expand Down
30 changes: 15 additions & 15 deletions Misc/NEWS.d/3.10.0a1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ convention. Patch by Donghee Na.
.. nonce: aJS9B3
.. section: Core and Builtins
Port the :mod:`_bisect` module to the multi-phase initialization API
Port the :mod:`!_bisect` module to the multi-phase initialization API
(:pep:`489`).

..
Expand Down Expand Up @@ -128,7 +128,7 @@ Taskaya.
.. nonce: lh335O
.. section: Core and Builtins
Port the :mod:`_lsprof` extension module to multi-phase initialization
Port the :mod:`!_lsprof` extension module to multi-phase initialization
(:pep:`489`).

..
Expand All @@ -148,7 +148,7 @@ Port the :mod:`cmath` extension module to multi-phase initialization
.. nonce: jiXmyT
.. section: Core and Builtins
Port the :mod:`_scproxy` extension module to multi-phase initialization
Port the :mod:`!_scproxy` extension module to multi-phase initialization
(:pep:`489`).

..
Expand All @@ -168,7 +168,7 @@ Port the :mod:`termios` extension module to multi-phase initialization
.. nonce: QuDIut
.. section: Core and Builtins
Convert the :mod:`_sha256` extension module types to heap types.
Convert the :mod:`!_sha256` extension module types to heap types.

..
Expand All @@ -187,7 +187,7 @@ classes with a huge amount of arguments. Patch by Pablo Galindo.
.. nonce: CnRME3
.. section: Core and Builtins
Port the :mod:`_overlapped` extension module to multi-phase initialization
Port the :mod:`!_overlapped` extension module to multi-phase initialization
(:pep:`489`).

..
Expand All @@ -197,7 +197,7 @@ Port the :mod:`_overlapped` extension module to multi-phase initialization
.. nonce: X9CZgo
.. section: Core and Builtins
Port the :mod:`_curses_panel` extension module to multi-phase initialization
Port the :mod:`!_curses_panel` extension module to multi-phase initialization
(:pep:`489`).

..
Expand All @@ -207,7 +207,7 @@ Port the :mod:`_curses_panel` extension module to multi-phase initialization
.. nonce: 5jZymK
.. section: Core and Builtins
Port the :mod:`_opcode` extension module to multi-phase initialization
Port the :mod:`!_opcode` extension module to multi-phase initialization
(:pep:`489`).

..
Expand Down Expand Up @@ -282,7 +282,7 @@ initialized ``_ast`` module.
.. nonce: vcxSUa
.. section: Core and Builtins
Convert :mod:`_operator` to use :c:func:`PyType_FromSpec`.
Convert :mod:`!_operator` to use :c:func:`PyType_FromSpec`.

..
Expand All @@ -291,7 +291,7 @@ Convert :mod:`_operator` to use :c:func:`PyType_FromSpec`.
.. nonce: fubBkb
.. section: Core and Builtins
Port :mod:`_sha3` to multi-phase init. Convert static types to heap types.
Port :mod:`!_sha3` to multi-phase init. Convert static types to heap types.

..
Expand All @@ -300,7 +300,7 @@ Port :mod:`_sha3` to multi-phase init. Convert static types to heap types.
.. nonce: FC13e7
.. section: Core and Builtins
Port the :mod:`_blake2` extension module to the multi-phase initialization
Port the :mod:`!_blake2` extension module to the multi-phase initialization
API (:pep:`489`).

..
Expand Down Expand Up @@ -339,7 +339,7 @@ The output of ``python --help`` contains now only ASCII characters.
.. nonce: O0d3ym
.. section: Core and Builtins
Port the :mod:`_sha1`, :mod:`_sha512`, and :mod:`_md5` extension modules to
Port the :mod:`!_sha1`, :mod:`!_sha512`, and :mod:`!_md5` extension modules to
multi-phase initialization API (:pep:`489`).

..
Expand Down Expand Up @@ -636,7 +636,7 @@ Remove the remaining files from the old parser and the :mod:`symbol` module.
.. nonce: _yI-ax
.. section: Core and Builtins
Convert :mod:`_bz2` to use :c:func:`PyType_FromSpec`.
Convert :mod:`!_bz2` to use :c:func:`PyType_FromSpec`.

..
Expand Down Expand Up @@ -666,7 +666,7 @@ by Brandt Bucher.
.. nonce: 61iyYh
.. section: Core and Builtins
Port :mod:`_gdbm` to multiphase initialization.
Port :mod:`!_gdbm` to multiphase initialization.

..
Expand Down Expand Up @@ -696,7 +696,7 @@ for emitting syntax errors. Patch by Pablo Galindo.
.. nonce: mmlp3Q
.. section: Core and Builtins
Port :mod:`_dbm` to multiphase initialization.
Port :mod:`!_dbm` to multiphase initialization.

..
Expand Down Expand Up @@ -1010,7 +1010,7 @@ Port :mod:`mmap` to multiphase initialization.
.. nonce: Kfe9fT
.. section: Core and Builtins
Port :mod:`_lzma` to multiphase initialization.
Port :mod:`!_lzma` to multiphase initialization.

..
Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.10.0a2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ plistlib: fix parsing XML plists with hexadecimal integer values
.. nonce: 85BsRA
.. section: Library
Fix an incorrectly formatted error from :meth:`_codecs.charmap_decode` when
Fix an incorrectly formatted error from :meth:`!_codecs.charmap_decode` when
called with a mapped value outside the range of valid Unicode code points.
PR by Max Bernstein.

Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.10.0a3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ Python already implicitly installs signal handlers: see
The ``Py_TRASHCAN_BEGIN`` macro no longer accesses PyTypeObject attributes,
but now can get the condition by calling the new private
:c:func:`_PyTrash_cond()` function which hides implementation details.
:c:func:`!_PyTrash_cond()` function which hides implementation details.

..
Expand Down
8 changes: 4 additions & 4 deletions Misc/NEWS.d/3.10.0a4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ subinterpreters. Patch by Victor Stinner.
.. nonce: j7nl6A
.. section: Core and Builtins
Make :c:func:`_PyUnicode_FromId` function compatible with subinterpreters.
Make :c:func:`!_PyUnicode_FromId` function compatible with subinterpreters.
Each interpreter now has an array of identifier objects (interned strings
decoded from UTF-8). Patch by Victor Stinner.

Expand Down Expand Up @@ -367,7 +367,7 @@ uses "options" instead.
.. nonce: Quy3zn
.. section: Library
Port the :mod:`_thread` extension module to the multiphase initialization
Port the :mod:`!_thread` extension module to the multiphase initialization
API (:pep:`489`) and convert its static types to heap types.

..
Expand Down Expand Up @@ -960,8 +960,8 @@ explicitly and so not exported.
.. nonce: Je08Ny
.. section: C API
Remove the private :c:func:`_Py_fopen` function which is no longer needed.
Use :c:func:`_Py_wfopen` or :c:func:`_Py_fopen_obj` instead. Patch by Victor
Remove the private :c:func:`!_Py_fopen` function which is no longer needed.
Use :c:func:`!_Py_wfopen` or :c:func:`!_Py_fopen_obj` instead. Patch by Victor
Stinner.

..
Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.10.0a5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ a slice at the start of the ``bytearray`` to a shorter byte string).
.. nonce: WfTdfg
.. section: Core and Builtins
Fix the :c:func:`_PyUnicode_FromId` function (_Py_IDENTIFIER(var) API) when
Fix the :c:func:`!_PyUnicode_FromId` function (_Py_IDENTIFIER(var) API) when
:c:func:`Py_Initialize` / :c:func:`Py_Finalize` is called multiple times:
preserve ``_PyRuntime.unicode_ids.next_index`` value.

Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.10.0a6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ Adds :const:`resource.RLIMIT_KQUEUES` constant from FreeBSD to the
.. section: Library
Make the pure Python implementation of :mod:`xml.etree.ElementTree` behave
the same as the C implementation (:mod:`_elementree`) regarding default
the same as the C implementation (:mod:`!_elementree`) regarding default
attribute values (by not setting ``specified_attributes=1``).

..
Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.10.0a7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ instruction dispatch a bit.
.. nonce: PhaT-B
.. section: Core and Builtins
Fix reference leak in the :mod:`_hashopenssl` extension. Patch by Pablo
Fix reference leak in the :mod:`!_hashopenssl` extension. Patch by Pablo
Galindo.

..
Expand Down
8 changes: 4 additions & 4 deletions Misc/NEWS.d/3.10.0b1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ normally be possible, but might occur in some unusual circumstances.
.. nonce: u5Y6bS
.. section: Core and Builtins
Importing the :mod:`_signal` module in a subinterpreter has no longer side
Importing the :mod:`!_signal` module in a subinterpreter has no longer side
effects.

..
Expand Down Expand Up @@ -776,11 +776,11 @@ builtins.open() is now io.open().
.. nonce: o1zEk_
.. section: Library
The Python :func:`_pyio.open` function becomes a static method to behave as
The Python :func:`!_pyio.open` function becomes a static method to behave as
:func:`io.open` built-in function: don't become a bound method when stored
as a class variable. It becomes possible since static methods are now
callable in Python 3.10. Moreover, :func:`_pyio.OpenWrapper` becomes a
simple alias to :func:`_pyio.open`. Patch by Victor Stinner.
callable in Python 3.10. Moreover, :func:`!_pyio.OpenWrapper` becomes a
simple alias to :func:`!_pyio.open`. Patch by Victor Stinner.

..
Expand Down
14 changes: 7 additions & 7 deletions Misc/NEWS.d/3.11.0a1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ Rename ``types.Union`` to ``types.UnionType``.
.. section: Core and Builtins
Expose specialization stats in python via
:func:`_opcode.get_specialization_stats`.
:func:`!_opcode.get_specialization_stats`.

..
Expand Down Expand Up @@ -1701,7 +1701,7 @@ Remove many old deprecated :mod:`unittest` features:
.. nonce: y1kEfP
.. section: Library
Remove the deprecated ``split()`` method of :class:`_tkinter.TkappType`.
Remove the deprecated ``split()`` method of :class:`!_tkinter.TkappType`.
Patch by Erlend E. Aasland.

..
Expand Down Expand Up @@ -2298,9 +2298,9 @@ Adopt *binacii.a2b_base64*'s strict mode in *base64.b64decode*.
.. nonce: ThuDMI
.. section: Library
Fixed a bug in the :mod:`_ssl` module that was throwing :exc:`OverflowError`
when using :meth:`_ssl._SSLSocket.write` and :meth:`_ssl._SSLSocket.read`
for a big value of the ``len`` parameter. Patch by Pablo Galindo
Fixed a bug in the :mod:`!_ssl` module that was throwing :exc:`OverflowError`
when using :meth:`!_ssl._SSLSocket.write` and :meth:`!_ssl._SSLSocket.read`
for a big value of the ``len`` parameter. Patch by Pablo Galindo.

..
Expand Down Expand Up @@ -2398,7 +2398,7 @@ class in the interactive session. Instead of :exc:`TypeError`, it should be
.. nonce: R3IcM1
.. section: Library
Fix memory leak in :func:`_tkinter._flatten` if it is called with a sequence
Fix memory leak in :func:`!_tkinter._flatten` if it is called with a sequence
or set, but not list or tuple.

..
Expand Down Expand Up @@ -4187,7 +4187,7 @@ Add calls of :func:`gc.collect` in tests to support PyPy.
.. nonce: mQZdXU
.. section: Tests
Made tests relying on the :mod:`_asyncio` C extension module optional to
Made tests relying on the :mod:`!_asyncio` C extension module optional to
allow running on alternative Python implementations. Patch by Serhiy
Storchaka.

Expand Down
4 changes: 2 additions & 2 deletions Misc/NEWS.d/3.11.0a2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Improve the :exc:`SyntaxError` message when using ``True``, ``None`` or
.. section: Core and Builtins
:data:`sys.stdlib_module_names` now contains the macOS-specific module
:mod:`_scproxy`.
:mod:`!_scproxy`.

..
Expand Down Expand Up @@ -1023,7 +1023,7 @@ compile shared modules.
.. nonce: 61gM2A
.. section: Build
:mod:`pyexpat` and :mod:`_elementtree` no longer define obsolete macros
:mod:`pyexpat` and :mod:`!_elementtree` no longer define obsolete macros
``HAVE_EXPAT_CONFIG_H`` and ``USE_PYEXPAT_CAPI``. ``XML_POOR_ENTROPY`` is
now defined in ``expat_config.h``.

Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.11.0a3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ invalid targets. Patch by Pablo Galindo
.. nonce: 3TmTSw
.. section: Core and Builtins
:c:func:`_PyErr_ChainStackItem` no longer normalizes ``exc_info`` (including
:c:func:`!_PyErr_ChainStackItem` no longer normalizes ``exc_info`` (including
setting the traceback on the exception instance) because ``exc_info`` is
always normalized.

Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.11.0a4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ instruction which performs the same operation, but without the loop.
.. nonce: ADVaPT
.. section: Core and Builtins
The code called from :c:func:`_PyErr_Display` was refactored to improve
The code called from :c:func:`!_PyErr_Display` was refactored to improve
error handling. It now exits immediately upon an unrecoverable error.

..
Expand Down
Loading

0 comments on commit 006b53a

Please sign in to comment.