Skip to content

Commit 377ff9d

Browse files
hugovkAlexWaygood
andauthored
[3.12] NEWS: Fix Sphinx warnings and increase threshold for new news nits (GH-121482) (#121514)
Co-authored-by: Hugo van Kemenade <[email protected]> Co-authored-by: Alex Waygood <[email protected]>
1 parent 32bbc36 commit 377ff9d

33 files changed

+89
-85
lines changed

Doc/conf.py

+3
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@
256256
('c:data', 'PyExc_UnicodeWarning'),
257257
('c:data', 'PyExc_UserWarning'),
258258
('c:data', 'PyExc_Warning'),
259+
# Undocumented public C macros
260+
('c:macro', 'Py_BUILD_ASSERT'),
261+
('c:macro', 'Py_BUILD_ASSERT_EXPR'),
259262
# Do not error nit-picky mode builds when _SubParsersAction.add_parser cannot
260263
# be resolved, as the method is currently undocumented. For context, see
261264
# https://github.com/python/cpython/pull/103289.

Doc/library/profile.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ you are using :class:`profile.Profile` or :class:`cProfile.Profile`,
692692
As the :class:`cProfile.Profile` class cannot be calibrated, custom timer
693693
functions should be used with care and should be as fast as possible. For
694694
the best results with a custom timer, it might be necessary to hard-code it
695-
in the C source of the internal :mod:`_lsprof` module.
695+
in the C source of the internal :mod:`!_lsprof` module.
696696

697697
Python 3.3 adds several new functions in :mod:`time` that can be used to make
698698
precise measurements of process or wall-clock time. For example, see

Doc/tools/check-warnings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from typing import TextIO
1515

1616
# Fail if NEWS nit found before this line number
17-
NEWS_NIT_THRESHOLD = 200
17+
NEWS_NIT_THRESHOLD = 300
1818

1919
# Exclude these whether they're dirty or clean,
2020
# because they trigger a rebuild of dirty files.

Doc/whatsnew/3.4.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,7 @@ The dictionary returned by :meth:`.SSLSocket.getpeercert` contains additional
14951495
stat
14961496
----
14971497

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

Doc/whatsnew/3.5.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1935,8 +1935,8 @@ specifying the namespace in which the code will be running.
19351935
tkinter
19361936
-------
19371937

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

Doc/whatsnew/3.7.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -2048,7 +2048,7 @@ The :mod:`macpath` is now deprecated and will be removed in Python 3.8.
20482048
threading
20492049
---------
20502050

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

21862186
* :mod:`asyncio` no longer exports the :mod:`selectors` and
2187-
:mod:`_overlapped` modules as ``asyncio.selectors`` and
2187+
:mod:`!_overlapped` modules as ``asyncio.selectors`` and
21882188
``asyncio._overlapped``. Replace ``from asyncio import selectors`` with
21892189
``import selectors``.
21902190

Misc/HISTORY

+1-1
Original file line numberDiff line numberDiff line change
@@ -3952,7 +3952,7 @@ Library
39523952
- Issue #18626: the inspect module now offers a basic command line
39533953
introspection interface (Initial patch by Claudiu Popa)
39543954

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

39583958
- Issue #19037: The mailbox module now makes all changes to maildir files

Misc/NEWS.d/3.10.0a1.rst

+15-15
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ convention. Patch by Donghee Na.
9797
.. nonce: aJS9B3
9898
.. section: Core and Builtins
9999
100-
Port the :mod:`_bisect` module to the multi-phase initialization API
100+
Port the :mod:`!_bisect` module to the multi-phase initialization API
101101
(:pep:`489`).
102102

103103
..
@@ -128,7 +128,7 @@ Taskaya.
128128
.. nonce: lh335O
129129
.. section: Core and Builtins
130130
131-
Port the :mod:`_lsprof` extension module to multi-phase initialization
131+
Port the :mod:`!_lsprof` extension module to multi-phase initialization
132132
(:pep:`489`).
133133

134134
..
@@ -148,7 +148,7 @@ Port the :mod:`cmath` extension module to multi-phase initialization
148148
.. nonce: jiXmyT
149149
.. section: Core and Builtins
150150
151-
Port the :mod:`_scproxy` extension module to multi-phase initialization
151+
Port the :mod:`!_scproxy` extension module to multi-phase initialization
152152
(:pep:`489`).
153153

154154
..
@@ -168,7 +168,7 @@ Port the :mod:`termios` extension module to multi-phase initialization
168168
.. nonce: QuDIut
169169
.. section: Core and Builtins
170170
171-
Convert the :mod:`_sha256` extension module types to heap types.
171+
Convert the :mod:`!_sha256` extension module types to heap types.
172172

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

193193
..
@@ -197,7 +197,7 @@ Port the :mod:`_overlapped` extension module to multi-phase initialization
197197
.. nonce: X9CZgo
198198
.. section: Core and Builtins
199199
200-
Port the :mod:`_curses_panel` extension module to multi-phase initialization
200+
Port the :mod:`!_curses_panel` extension module to multi-phase initialization
201201
(:pep:`489`).
202202

203203
..
@@ -207,7 +207,7 @@ Port the :mod:`_curses_panel` extension module to multi-phase initialization
207207
.. nonce: 5jZymK
208208
.. section: Core and Builtins
209209
210-
Port the :mod:`_opcode` extension module to multi-phase initialization
210+
Port the :mod:`!_opcode` extension module to multi-phase initialization
211211
(:pep:`489`).
212212

213213
..
@@ -282,7 +282,7 @@ initialized ``_ast`` module.
282282
.. nonce: vcxSUa
283283
.. section: Core and Builtins
284284
285-
Convert :mod:`_operator` to use :c:func:`PyType_FromSpec`.
285+
Convert :mod:`!_operator` to use :c:func:`PyType_FromSpec`.
286286

287287
..
288288
@@ -291,7 +291,7 @@ Convert :mod:`_operator` to use :c:func:`PyType_FromSpec`.
291291
.. nonce: fubBkb
292292
.. section: Core and Builtins
293293
294-
Port :mod:`_sha3` to multi-phase init. Convert static types to heap types.
294+
Port :mod:`!_sha3` to multi-phase init. Convert static types to heap types.
295295

296296
..
297297
@@ -300,7 +300,7 @@ Port :mod:`_sha3` to multi-phase init. Convert static types to heap types.
300300
.. nonce: FC13e7
301301
.. section: Core and Builtins
302302
303-
Port the :mod:`_blake2` extension module to the multi-phase initialization
303+
Port the :mod:`!_blake2` extension module to the multi-phase initialization
304304
API (:pep:`489`).
305305

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

345345
..
@@ -636,7 +636,7 @@ Remove the remaining files from the old parser and the :mod:`symbol` module.
636636
.. nonce: _yI-ax
637637
.. section: Core and Builtins
638638
639-
Convert :mod:`_bz2` to use :c:func:`PyType_FromSpec`.
639+
Convert :mod:`!_bz2` to use :c:func:`PyType_FromSpec`.
640640

641641
..
642642
@@ -666,7 +666,7 @@ by Brandt Bucher.
666666
.. nonce: 61iyYh
667667
.. section: Core and Builtins
668668
669-
Port :mod:`_gdbm` to multiphase initialization.
669+
Port :mod:`!_gdbm` to multiphase initialization.
670670

671671
..
672672
@@ -696,7 +696,7 @@ for emitting syntax errors. Patch by Pablo Galindo.
696696
.. nonce: mmlp3Q
697697
.. section: Core and Builtins
698698
699-
Port :mod:`_dbm` to multiphase initialization.
699+
Port :mod:`!_dbm` to multiphase initialization.
700700

701701
..
702702
@@ -1010,7 +1010,7 @@ Port :mod:`mmap` to multiphase initialization.
10101010
.. nonce: Kfe9fT
10111011
.. section: Core and Builtins
10121012
1013-
Port :mod:`_lzma` to multiphase initialization.
1013+
Port :mod:`!_lzma` to multiphase initialization.
10141014

10151015
..
10161016

Misc/NEWS.d/3.10.0a2.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ plistlib: fix parsing XML plists with hexadecimal integer values
362362
.. nonce: 85BsRA
363363
.. section: Library
364364
365-
Fix an incorrectly formatted error from :meth:`_codecs.charmap_decode` when
365+
Fix an incorrectly formatted error from :meth:`!_codecs.charmap_decode` when
366366
called with a mapped value outside the range of valid Unicode code points.
367367
PR by Max Bernstein.
368368

Misc/NEWS.d/3.10.0a3.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1386,7 +1386,7 @@ Python already implicitly installs signal handlers: see
13861386
13871387
The ``Py_TRASHCAN_BEGIN`` macro no longer accesses PyTypeObject attributes,
13881388
but now can get the condition by calling the new private
1389-
:c:func:`_PyTrash_cond()` function which hides implementation details.
1389+
:c:func:`!_PyTrash_cond()` function which hides implementation details.
13901390

13911391
..
13921392

Misc/NEWS.d/3.10.0a4.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ subinterpreters. Patch by Victor Stinner.
193193
.. nonce: j7nl6A
194194
.. section: Core and Builtins
195195
196-
Make :c:func:`_PyUnicode_FromId` function compatible with subinterpreters.
196+
Make :c:func:`!_PyUnicode_FromId` function compatible with subinterpreters.
197197
Each interpreter now has an array of identifier objects (interned strings
198198
decoded from UTF-8). Patch by Victor Stinner.
199199

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

373373
..
@@ -960,8 +960,8 @@ explicitly and so not exported.
960960
.. nonce: Je08Ny
961961
.. section: C API
962962
963-
Remove the private :c:func:`_Py_fopen` function which is no longer needed.
964-
Use :c:func:`_Py_wfopen` or :c:func:`_Py_fopen_obj` instead. Patch by Victor
963+
Remove the private :c:func:`!_Py_fopen` function which is no longer needed.
964+
Use :c:func:`!_Py_wfopen` or :c:func:`!_Py_fopen_obj` instead. Patch by Victor
965965
Stinner.
966966

967967
..

Misc/NEWS.d/3.10.0a5.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ a slice at the start of the ``bytearray`` to a shorter byte string).
108108
.. nonce: WfTdfg
109109
.. section: Core and Builtins
110110
111-
Fix the :c:func:`_PyUnicode_FromId` function (_Py_IDENTIFIER(var) API) when
111+
Fix the :c:func:`!_PyUnicode_FromId` function (_Py_IDENTIFIER(var) API) when
112112
:c:func:`Py_Initialize` / :c:func:`Py_Finalize` is called multiple times:
113113
preserve ``_PyRuntime.unicode_ids.next_index`` value.
114114

Misc/NEWS.d/3.10.0a6.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ Adds :const:`resource.RLIMIT_KQUEUES` constant from FreeBSD to the
315315
.. section: Library
316316
317317
Make the pure Python implementation of :mod:`xml.etree.ElementTree` behave
318-
the same as the C implementation (:mod:`_elementree`) regarding default
318+
the same as the C implementation (:mod:`!_elementree`) regarding default
319319
attribute values (by not setting ``specified_attributes=1``).
320320

321321
..

Misc/NEWS.d/3.10.0a7.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ instruction dispatch a bit.
8383
.. nonce: PhaT-B
8484
.. section: Core and Builtins
8585
86-
Fix reference leak in the :mod:`_hashopenssl` extension. Patch by Pablo
86+
Fix reference leak in the :mod:`!_hashopenssl` extension. Patch by Pablo
8787
Galindo.
8888

8989
..

Misc/NEWS.d/3.10.0b1.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ normally be possible, but might occur in some unusual circumstances.
182182
.. nonce: u5Y6bS
183183
.. section: Core and Builtins
184184
185-
Importing the :mod:`_signal` module in a subinterpreter has no longer side
185+
Importing the :mod:`!_signal` module in a subinterpreter has no longer side
186186
effects.
187187

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

785785
..
786786

Misc/NEWS.d/3.11.0a1.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ Rename ``types.Union`` to ``types.UnionType``.
613613
.. section: Core and Builtins
614614
615615
Expose specialization stats in python via
616-
:func:`_opcode.get_specialization_stats`.
616+
:func:`!_opcode.get_specialization_stats`.
617617

618618
..
619619
@@ -1701,7 +1701,7 @@ Remove many old deprecated :mod:`unittest` features:
17011701
.. nonce: y1kEfP
17021702
.. section: Library
17031703
1704-
Remove the deprecated ``split()`` method of :class:`_tkinter.TkappType`.
1704+
Remove the deprecated ``split()`` method of :class:`!_tkinter.TkappType`.
17051705
Patch by Erlend E. Aasland.
17061706

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

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

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

Misc/NEWS.d/3.11.0a2.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Improve the :exc:`SyntaxError` message when using ``True``, ``None`` or
1515
.. section: Core and Builtins
1616
1717
:data:`sys.stdlib_module_names` now contains the macOS-specific module
18-
:mod:`_scproxy`.
18+
:mod:`!_scproxy`.
1919

2020
..
2121
@@ -1023,7 +1023,7 @@ compile shared modules.
10231023
.. nonce: 61gM2A
10241024
.. section: Build
10251025
1026-
:mod:`pyexpat` and :mod:`_elementtree` no longer define obsolete macros
1026+
:mod:`pyexpat` and :mod:`!_elementtree` no longer define obsolete macros
10271027
``HAVE_EXPAT_CONFIG_H`` and ``USE_PYEXPAT_CAPI``. ``XML_POOR_ENTROPY`` is
10281028
now defined in ``expat_config.h``.
10291029

Misc/NEWS.d/3.11.0a3.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ invalid targets. Patch by Pablo Galindo
2727
.. nonce: 3TmTSw
2828
.. section: Core and Builtins
2929
30-
:c:func:`_PyErr_ChainStackItem` no longer normalizes ``exc_info`` (including
30+
:c:func:`!_PyErr_ChainStackItem` no longer normalizes ``exc_info`` (including
3131
setting the traceback on the exception instance) because ``exc_info`` is
3232
always normalized.
3333

Misc/NEWS.d/3.11.0a4.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ instruction which performs the same operation, but without the loop.
258258
.. nonce: ADVaPT
259259
.. section: Core and Builtins
260260
261-
The code called from :c:func:`_PyErr_Display` was refactored to improve
261+
The code called from :c:func:`!_PyErr_Display` was refactored to improve
262262
error handling. It now exits immediately upon an unrecoverable error.
263263

264264
..

0 commit comments

Comments
 (0)