Skip to content

Commit 045663f

Browse files
authored
[3.12] gh-101100: Fix Sphinx warnings in whatsnew/3.11.rst and related (GH-114531) (#114649)
1 parent 5c21f3d commit 045663f

14 files changed

+61
-61
lines changed

Doc/whatsnew/2.7.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2130,7 +2130,7 @@ Changes to Python's build process and to the C API include:
21302130
only the filename, function name, and first line number are required.
21312131
This is useful for extension modules that are attempting to
21322132
construct a more useful traceback stack. Previously such
2133-
extensions needed to call :c:func:`PyCode_New`, which had many
2133+
extensions needed to call :c:func:`!PyCode_New`, which had many
21342134
more arguments. (Added by Jeffrey Yasskin.)
21352135

21362136
* New function: :c:func:`PyErr_NewExceptionWithDoc` creates a new

Doc/whatsnew/3.11.rst

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ enum
672672

673673
* Changed :meth:`Enum.__format__() <enum.Enum.__format__>` (the default for
674674
:func:`format`, :meth:`str.format` and :term:`f-string`\s) to always produce
675-
the same result as :meth:`Enum.__str__()`: for enums inheriting from
675+
the same result as :meth:`Enum.__str__() <enum.Enum.__str__>`: for enums inheriting from
676676
:class:`~enum.ReprEnum` it will be the member's value; for all other enums
677677
it will be the enum and member name (e.g. ``Color.RED``).
678678

@@ -1604,7 +1604,7 @@ raw, adaptive bytecode containing quickened data.
16041604
New opcodes
16051605
-----------
16061606

1607-
* :opcode:`ASYNC_GEN_WRAP`, :opcode:`RETURN_GENERATOR` and :opcode:`SEND`,
1607+
* :opcode:`!ASYNC_GEN_WRAP`, :opcode:`RETURN_GENERATOR` and :opcode:`SEND`,
16081608
used in generators and co-routines.
16091609

16101610
* :opcode:`COPY_FREE_VARS`,
@@ -1615,7 +1615,7 @@ New opcodes
16151615

16161616
* :opcode:`MAKE_CELL`, to create :ref:`cell-objects`.
16171617

1618-
* :opcode:`CHECK_EG_MATCH` and :opcode:`PREP_RERAISE_STAR`,
1618+
* :opcode:`CHECK_EG_MATCH` and :opcode:`!PREP_RERAISE_STAR`,
16191619
to handle the :ref:`new exception groups and except* <whatsnew311-pep654>`
16201620
added in :pep:`654`.
16211621

@@ -1630,38 +1630,38 @@ New opcodes
16301630
Replaced opcodes
16311631
----------------
16321632

1633-
+------------------------------------+-----------------------------------+-----------------------------------------+
1634-
| Replaced Opcode(s) | New Opcode(s) | Notes |
1635-
+====================================+===================================+=========================================+
1636-
| | :opcode:`!BINARY_*` | :opcode:`BINARY_OP` | Replaced all numeric binary/in-place |
1637-
| | :opcode:`!INPLACE_*` | | opcodes with a single opcode |
1638-
+------------------------------------+-----------------------------------+-----------------------------------------+
1639-
| | :opcode:`!CALL_FUNCTION` | | :opcode:`CALL` | Decouples argument shifting for methods |
1640-
| | :opcode:`!CALL_FUNCTION_KW` | | :opcode:`KW_NAMES` | from handling of keyword arguments; |
1641-
| | :opcode:`!CALL_METHOD` | | :opcode:`PRECALL` | allows better specialization of calls |
1642-
| | | :opcode:`PUSH_NULL` | |
1643-
+------------------------------------+-----------------------------------+-----------------------------------------+
1644-
| | :opcode:`!DUP_TOP` | | :opcode:`COPY` | Stack manipulation instructions |
1645-
| | :opcode:`!DUP_TOP_TWO` | | :opcode:`SWAP` | |
1646-
| | :opcode:`!ROT_TWO` | | |
1647-
| | :opcode:`!ROT_THREE` | | |
1648-
| | :opcode:`!ROT_FOUR` | | |
1649-
| | :opcode:`!ROT_N` | | |
1650-
+------------------------------------+-----------------------------------+-----------------------------------------+
1651-
| | :opcode:`!JUMP_IF_NOT_EXC_MATCH` | | :opcode:`CHECK_EXC_MATCH` | Now performs check but doesn't jump |
1652-
+------------------------------------+-----------------------------------+-----------------------------------------+
1653-
| | :opcode:`!JUMP_ABSOLUTE` | | :opcode:`JUMP_BACKWARD` | See [#bytecode-jump]_; |
1654-
| | :opcode:`!POP_JUMP_IF_FALSE` | | :opcode:`POP_JUMP_BACKWARD_IF_* | ``TRUE``, ``FALSE``, |
1655-
| | :opcode:`!POP_JUMP_IF_TRUE` | <POP_JUMP_BACKWARD_IF_TRUE>` | ``NONE`` and ``NOT_NONE`` variants |
1656-
| | | :opcode:`POP_JUMP_FORWARD_IF_* | for each direction |
1657-
| | <POP_JUMP_FORWARD_IF_TRUE>` | |
1658-
+------------------------------------+-----------------------------------+-----------------------------------------+
1659-
| | :opcode:`!SETUP_WITH` | :opcode:`BEFORE_WITH` | :keyword:`with` block setup |
1660-
| | :opcode:`!SETUP_ASYNC_WITH` | | |
1661-
+------------------------------------+-----------------------------------+-----------------------------------------+
1633+
+------------------------------------+------------------------------------+-----------------------------------------+
1634+
| Replaced Opcode(s) | New Opcode(s) | Notes |
1635+
+====================================+====================================+=========================================+
1636+
| | :opcode:`!BINARY_*` | :opcode:`BINARY_OP` | Replaced all numeric binary/in-place |
1637+
| | :opcode:`!INPLACE_*` | | opcodes with a single opcode |
1638+
+------------------------------------+------------------------------------+-----------------------------------------+
1639+
| | :opcode:`!CALL_FUNCTION` | | :opcode:`CALL` | Decouples argument shifting for methods |
1640+
| | :opcode:`!CALL_FUNCTION_KW` | | :opcode:`!KW_NAMES` | from handling of keyword arguments; |
1641+
| | :opcode:`!CALL_METHOD` | | :opcode:`!PRECALL` | allows better specialization of calls |
1642+
| | | :opcode:`PUSH_NULL` | |
1643+
+------------------------------------+------------------------------------+-----------------------------------------+
1644+
| | :opcode:`!DUP_TOP` | | :opcode:`COPY` | Stack manipulation instructions |
1645+
| | :opcode:`!DUP_TOP_TWO` | | :opcode:`SWAP` | |
1646+
| | :opcode:`!ROT_TWO` | | |
1647+
| | :opcode:`!ROT_THREE` | | |
1648+
| | :opcode:`!ROT_FOUR` | | |
1649+
| | :opcode:`!ROT_N` | | |
1650+
+------------------------------------+------------------------------------+-----------------------------------------+
1651+
| | :opcode:`!JUMP_IF_NOT_EXC_MATCH` | | :opcode:`CHECK_EXC_MATCH` | Now performs check but doesn't jump |
1652+
+------------------------------------+------------------------------------+-----------------------------------------+
1653+
| | :opcode:`!JUMP_ABSOLUTE` | | :opcode:`JUMP_BACKWARD` | See [#bytecode-jump]_; |
1654+
| | :opcode:`!POP_JUMP_IF_FALSE` | | :opcode:`!POP_JUMP_BACKWARD_IF_*`| ``TRUE``, ``FALSE``, |
1655+
| | :opcode:`!POP_JUMP_IF_TRUE` | | :opcode:`!POP_JUMP_FORWARD_IF_*` | ``NONE`` and ``NOT_NONE`` variants |
1656+
| | | for each direction |
1657+
| | | |
1658+
+------------------------------------+------------------------------------+-----------------------------------------+
1659+
| | :opcode:`!SETUP_WITH` | :opcode:`BEFORE_WITH` | :keyword:`with` block setup |
1660+
| | :opcode:`!SETUP_ASYNC_WITH` | | |
1661+
+------------------------------------+------------------------------------+-----------------------------------------+
16621662

16631663
.. [#bytecode-jump] All jump opcodes are now relative, including the
1664-
existing :opcode:`JUMP_IF_TRUE_OR_POP` and :opcode:`JUMP_IF_FALSE_OR_POP`.
1664+
existing :opcode:`!JUMP_IF_TRUE_OR_POP` and :opcode:`!JUMP_IF_FALSE_OR_POP`.
16651665
The argument is now an offset from the current instruction
16661666
rather than an absolute location.
16671667
@@ -1967,7 +1967,7 @@ Removed C APIs are :ref:`listed separately <whatsnew311-c-api-removed>`.
19671967

19681968
(Contributed by Victor Stinner in :issue:`45085`.)
19691969

1970-
* Removed the :mod:`distutils` ``bdist_msi`` command deprecated in Python 3.9.
1970+
* Removed the :mod:`!distutils` ``bdist_msi`` command deprecated in Python 3.9.
19711971
Use ``bdist_wheel`` (wheel packages) instead.
19721972
(Contributed by Hugo van Kemenade in :issue:`45124`.)
19731973

@@ -2295,7 +2295,7 @@ Porting to Python 3.11
22952295
as its second parameter, instead of ``PyFrameObject*``.
22962296
See :pep:`523` for more details of how to use this function pointer type.
22972297

2298-
* :c:func:`PyCode_New` and :c:func:`PyCode_NewWithPosOnlyArgs` now take
2298+
* :c:func:`!PyCode_New` and :c:func:`!PyCode_NewWithPosOnlyArgs` now take
22992299
an additional ``exception_table`` argument.
23002300
Using these functions should be avoided, if at all possible.
23012301
To get a custom code object: create a code object using the compiler,
@@ -2402,7 +2402,7 @@ Porting to Python 3.11
24022402
been included directly, consider including ``Python.h`` instead.
24032403
(Contributed by Victor Stinner in :issue:`35134`.)
24042404

2405-
* The :c:func:`PyUnicode_CHECK_INTERNED` macro has been excluded from the
2405+
* The :c:func:`!PyUnicode_CHECK_INTERNED` macro has been excluded from the
24062406
limited C API. It was never usable there, because it used internal structures
24072407
which are not available in the limited C API.
24082408
(Contributed by Victor Stinner in :issue:`46007`.)
@@ -2465,7 +2465,7 @@ Porting to Python 3.11
24652465

24662466
Debuggers that accessed the :attr:`~frame.f_locals` directly *must* call
24672467
:c:func:`PyFrame_GetLocals` instead. They no longer need to call
2468-
:c:func:`PyFrame_FastToLocalsWithError` or :c:func:`PyFrame_LocalsToFast`,
2468+
:c:func:`!PyFrame_FastToLocalsWithError` or :c:func:`!PyFrame_LocalsToFast`,
24692469
in fact they should not call those functions. The necessary updating of the
24702470
frame is now managed by the virtual machine.
24712471

@@ -2604,8 +2604,8 @@ and will be removed in Python 3.12.
26042604
* :c:func:`!PyUnicode_GET_DATA_SIZE`
26052605
* :c:func:`!PyUnicode_GET_SIZE`
26062606
* :c:func:`!PyUnicode_GetSize`
2607-
* :c:func:`PyUnicode_IS_COMPACT`
2608-
* :c:func:`PyUnicode_IS_READY`
2607+
* :c:func:`!PyUnicode_IS_COMPACT`
2608+
* :c:func:`!PyUnicode_IS_READY`
26092609
* :c:func:`PyUnicode_READY`
26102610
* :c:func:`!PyUnicode_WSTR_LENGTH`
26112611
* :c:func:`!_PyUnicode_AsUnicode`
@@ -2660,7 +2660,7 @@ Removed
26602660
(Contributed by Victor Stinner in :issue:`45474`.)
26612661

26622662
* Exclude :c:func:`PyWeakref_GET_OBJECT` from the limited C API. It never
2663-
worked since the :c:type:`PyWeakReference` structure is opaque in the
2663+
worked since the :c:type:`!PyWeakReference` structure is opaque in the
26642664
limited C API.
26652665
(Contributed by Victor Stinner in :issue:`35134`.)
26662666

Doc/whatsnew/3.8.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,8 +1623,8 @@ Build and C API Changes
16231623
allocation or deallocation may need to be adjusted.
16241624
(Contributed by Eddie Elizondo in :issue:`35810`.)
16251625

1626-
* The new function :c:func:`PyCode_NewWithPosOnlyArgs` allows to create
1627-
code objects like :c:func:`PyCode_New`, but with an extra *posonlyargcount*
1626+
* The new function :c:func:`!PyCode_NewWithPosOnlyArgs` allows to create
1627+
code objects like :c:func:`!PyCode_New`, but with an extra *posonlyargcount*
16281628
parameter for indicating the number of positional-only arguments.
16291629
(Contributed by Pablo Galindo in :issue:`37221`.)
16301630

Misc/NEWS.d/3.11.0a2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ context objects can now be disabled.
11891189
.. section: C API
11901190
11911191
Exclude :c:func:`PyWeakref_GET_OBJECT` from the limited C API. It never
1192-
worked since the :c:type:`PyWeakReference` structure is opaque in the
1192+
worked since the :c:type:`!PyWeakReference` structure is opaque in the
11931193
limited C API.
11941194

11951195
..

Misc/NEWS.d/3.11.0a4.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ faster due to reference-counting optimizations. Patch by Dennis Sweeney.
161161
.. nonce: 7oGp-I
162162
.. section: Core and Builtins
163163
164-
:opcode:`PREP_RERAISE_STAR` no longer pushes ``lasti`` to the stack.
164+
:opcode:`!PREP_RERAISE_STAR` no longer pushes ``lasti`` to the stack.
165165

166166
..
167167
@@ -170,7 +170,7 @@ faster due to reference-counting optimizations. Patch by Dennis Sweeney.
170170
.. nonce: IKx4v6
171171
.. section: Core and Builtins
172172
173-
Remove :opcode:`POP_EXCEPT_AND_RERAISE` and replace it by an equivalent
173+
Remove :opcode:`!POP_EXCEPT_AND_RERAISE` and replace it by an equivalent
174174
sequence of other opcodes.
175175

176176
..
@@ -1171,7 +1171,7 @@ Replaced deprecated usage of :c:func:`PyImport_ImportModuleNoBlock` with
11711171
.. nonce: sMgDLz
11721172
.. section: C API
11731173
1174-
The :c:func:`PyUnicode_CHECK_INTERNED` macro has been excluded from the
1174+
The :c:func:`!PyUnicode_CHECK_INTERNED` macro has been excluded from the
11751175
limited C API. It was never usable there, because it used internal
11761176
structures which are not available in the limited C API. Patch by Victor
11771177
Stinner.

Misc/NEWS.d/3.11.0a6.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ Don't un-adapt :opcode:`COMPARE_OP` when collecting specialization stats.
248248
.. nonce: RX_AzJ
249249
.. section: Core and Builtins
250250
251-
Fix specialization stats gathering for :opcode:`PRECALL` instructions.
251+
Fix specialization stats gathering for :opcode:`!PRECALL` instructions.
252252

253253
..
254254

Misc/NEWS.d/3.11.0a7.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Replaced :opcode:`JUMP_ABSOLUTE` by the relative jump
138138
.. nonce: SwrrFO
139139
.. section: Core and Builtins
140140
141-
:c:func:`PyFrame_FastToLocalsWithError` and :c:func:`PyFrame_LocalsToFast`
141+
:c:func:`!PyFrame_FastToLocalsWithError` and :c:func:`!PyFrame_LocalsToFast`
142142
are no longer called during profiling nor tracing. C code can access the
143143
``f_locals`` attribute of :c:type:`PyFrameObject` by calling
144144
:c:func:`PyFrame_GetLocals`.
@@ -295,7 +295,7 @@ oparg) as an adaptive counter.
295295
.. nonce: O12Pba
296296
.. section: Core and Builtins
297297
298-
Use inline caching for :opcode:`PRECALL` and :opcode:`CALL`, and remove the
298+
Use inline caching for :opcode:`!PRECALL` and :opcode:`CALL`, and remove the
299299
internal machinery for managing the (now unused) non-inline caches.
300300

301301
..

Misc/NEWS.d/3.11.0b1.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,8 @@ so this led to crashes. The problem is now fixed.
403403
.. nonce: 6S_uoU
404404
.. section: Core and Builtins
405405
406-
Make opcodes :opcode:`JUMP_IF_TRUE_OR_POP` and
407-
:opcode:`JUMP_IF_FALSE_OR_POP` relative rather than absolute.
406+
Make opcodes :opcode:`!JUMP_IF_TRUE_OR_POP` and
407+
:opcode:`!JUMP_IF_FALSE_OR_POP` relative rather than absolute.
408408

409409
..
410410

Misc/NEWS.d/3.12.0a4.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Fix misleading default value in :func:`input`'s ``__text_signature__``.
1313
.. nonce: cmGwxv
1414
.. section: Core and Builtins
1515
16-
Remove :opcode:`UNARY_POSITIVE`, :opcode:`ASYNC_GEN_WRAP` and
17-
:opcode:`LIST_TO_TUPLE`, replacing them with intrinsics.
16+
Remove :opcode:`!UNARY_POSITIVE`, :opcode:`!ASYNC_GEN_WRAP` and
17+
:opcode:`!LIST_TO_TUPLE`, replacing them with intrinsics.
1818

1919
..
2020

Misc/NEWS.d/3.12.0a6.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ all as not all platform C libraries generate an error.
170170
.. section: Core and Builtins
171171
172172
Add :opcode:`CALL_INTRINSIC_2` and use it instead of
173-
:opcode:`PREP_RERAISE_STAR`.
173+
:opcode:`!PREP_RERAISE_STAR`.
174174

175175
..
176176

Misc/NEWS.d/3.12.0a7.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Reduce the number of inline :opcode:`CACHE` entries for
2424
.. nonce: PRkGca
2525
.. section: Core and Builtins
2626
27-
Removed :opcode:`JUMP_IF_FALSE_OR_POP` and :opcode:`JUMP_IF_TRUE_OR_POP`
27+
Removed :opcode:`!JUMP_IF_FALSE_OR_POP` and :opcode:`!JUMP_IF_TRUE_OR_POP`
2828
instructions.
2929

3030
..

Misc/NEWS.d/3.8.0a1.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3395,8 +3395,8 @@ Zackery Spytz.
33953395
.. nonce: S0Irst
33963396
.. section: Library
33973397
3398-
Fix parsing non-ASCII identifiers in :mod:`lib2to3.pgen2.tokenize` (PEP
3399-
3131).
3398+
Fix parsing non-ASCII identifiers in :mod:`!lib2to3.pgen2.tokenize`
3399+
(:pep:`3131`).
34003400

34013401
..
34023402

Misc/NEWS.d/3.9.0a1.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5715,8 +5715,8 @@ The :c:macro:`METH_FASTCALL` calling convention has been documented.
57155715
.. nonce: 4tClQT
57165716
.. section: C API
57175717
5718-
The new function :c:func:`PyCode_NewWithPosOnlyArgs` allows to create code
5719-
objects like :c:func:`PyCode_New`, but with an extra *posonlyargcount*
5718+
The new function :c:func:`!PyCode_NewWithPosOnlyArgs` allows to create code
5719+
objects like :c:func:`!PyCode_New`, but with an extra *posonlyargcount*
57205720
parameter for indicating the number of positonal-only arguments.
57215721

57225722
..

Misc/NEWS.d/3.9.0a5.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ a different condition than the GIL.
11221122
.. nonce: Nbl7lF
11231123
.. section: Tools/Demos
11241124
1125-
Added support to fix ``getproxies`` in the :mod:`lib2to3.fixes.fix_urllib`
1125+
Added support to fix ``getproxies`` in the :mod:`!lib2to3.fixes.fix_urllib`
11261126
module. Patch by José Roberto Meza Cabrera.
11271127

11281128
..

0 commit comments

Comments
 (0)