From f0a621b4c05af926883259cbe5bb6d076b4ba6dc Mon Sep 17 00:00:00 2001 From: Yuki Kobayashi Date: Sun, 24 Nov 2024 12:04:27 +0000 Subject: [PATCH] gh-101100: Fix sphinx warnings of removed opcodes Fixed sphinx warnings: ``` whatsnew/3.11.rst:1674: WARNING: 'opcode' reference target not found: BEFORE_WITH [ref.opcode] whatsnew/3.4.rst:1982: WARNING: 'opcode' reference target not found: LOAD_CLASSDEREF [ref.opcode] whatsnew/3.6.rst:2369: WARNING: 'opcode' reference target not found: FORMAT_VALUE [ref.opcode] whatsnew/3.6.rst:2374: WARNING: 'opcode' reference target not found: BUILD_CONST_KEY_MAP [ref.opcode] whatsnew/3.6.rst:2378: WARNING: 'opcode' reference target not found: CALL_FUNCTION [ref.opcode] whatsnew/3.6.rst:2378: WARNING: 'opcode' reference target not found: CALL_FUNCTION_KW [ref.opcode] whatsnew/3.6.rst:2378: WARNING: 'opcode' reference target not found: BUILD_MAP_UNPACK_WITH_CALL [ref.opcode] whatsnew/3.6.rst:2378: WARNING: 'opcode' reference target not found: BUILD_TUPLE_UNPACK_WITH_CALL [ref.opcode] whatsnew/3.6.rst:2389: WARNING: 'opcode' reference target not found: STORE_ANNOTATION [ref.opcode] whatsnew/3.7.rst:2479: WARNING: 'opcode' reference target not found: CALL_METHOD [ref.opcode] whatsnew/3.7.rst:2482: WARNING: 'opcode' reference target not found: STORE_ANNOTATION [ref.opcode] whatsnew/3.8.rst:2155: WARNING: 'opcode' reference target not found: BREAK_LOOP [ref.opcode] whatsnew/3.8.rst:2155: WARNING: 'opcode' reference target not found: CONTINUE_LOOP [ref.opcode] whatsnew/3.8.rst:2155: WARNING: 'opcode' reference target not found: SETUP_LOOP [ref.opcode] whatsnew/3.8.rst:2155: WARNING: 'opcode' reference target not found: SETUP_EXCEPT [ref.opcode] whatsnew/3.8.rst:2155: WARNING: 'opcode' reference target not found: ROT_FOUR [ref.opcode] whatsnew/3.8.rst:2155: WARNING: 'opcode' reference target not found: BEGIN_FINALLY [ref.opcode] whatsnew/3.8.rst:2155: WARNING: 'opcode' reference target not found: CALL_FINALLY [ref.opcode] whatsnew/3.8.rst:2155: WARNING: 'opcode' reference target not found: POP_FINALLY [ref.opcode] whatsnew/3.8.rst:2155: WARNING: 'opcode' reference target not found: END_FINALLY [ref.opcode] whatsnew/3.8.rst:2155: WARNING: 'opcode' reference target not found: WITH_CLEANUP_START [ref.opcode] whatsnew/3.9.rst:1206: WARNING: 'opcode' reference target not found: LOAD_ASSERTION_ERROR [ref.opcode] ``` --- Doc/whatsnew/3.11.rst | 2 +- Doc/whatsnew/3.4.rst | 2 +- Doc/whatsnew/3.6.rst | 12 ++++++------ Doc/whatsnew/3.7.rst | 4 ++-- Doc/whatsnew/3.8.rst | 10 +++++----- Doc/whatsnew/3.9.rst | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index e5c6d7cd308504..ed41ecd50b0011 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -1670,7 +1670,7 @@ Replaced opcodes | | | for each direction | | | | | +------------------------------------+------------------------------------+-----------------------------------------+ -| | :opcode:`!SETUP_WITH` | :opcode:`BEFORE_WITH` | :keyword:`with` block setup | +| | :opcode:`!SETUP_WITH` | :opcode:`!BEFORE_WITH` | :keyword:`with` block setup | | | :opcode:`!SETUP_ASYNC_WITH` | | | +------------------------------------+------------------------------------+-----------------------------------------+ diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst index 9d746b378995c3..71b186aeed7359 100644 --- a/Doc/whatsnew/3.4.rst +++ b/Doc/whatsnew/3.4.rst @@ -1979,7 +1979,7 @@ Other Improvements now works correctly (previously it silently returned the first python module in the file). (Contributed by Václav Šmilauer in :issue:`16421`.) -* A new opcode, :opcode:`LOAD_CLASSDEREF`, has been added to fix a bug in the +* A new opcode, :opcode:`!LOAD_CLASSDEREF`, has been added to fix a bug in the loading of free variables in class bodies that could be triggered by certain uses of :ref:`__prepare__ `. (Contributed by Benjamin Peterson in :issue:`17853`.) diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst index 2276fed60c8db3..1fcc5d7cbfb387 100644 --- a/Doc/whatsnew/3.6.rst +++ b/Doc/whatsnew/3.6.rst @@ -2366,27 +2366,27 @@ There have been several major changes to the :term:`bytecode` in Python 3.6. (Contributed by Demur Rumed with input and reviews from Serhiy Storchaka and Victor Stinner in :issue:`26647` and :issue:`28050`.) -* The new :opcode:`FORMAT_VALUE` and :opcode:`BUILD_STRING` opcodes as part +* The new :opcode:`!FORMAT_VALUE` and :opcode:`BUILD_STRING` opcodes as part of the :ref:`formatted string literal ` implementation. (Contributed by Eric Smith in :issue:`25483` and Serhiy Storchaka in :issue:`27078`.) -* The new :opcode:`BUILD_CONST_KEY_MAP` opcode to optimize the creation +* The new :opcode:`!BUILD_CONST_KEY_MAP` opcode to optimize the creation of dictionaries with constant keys. (Contributed by Serhiy Storchaka in :issue:`27140`.) * The function call opcodes have been heavily reworked for better performance and simpler implementation. - The :opcode:`MAKE_FUNCTION`, :opcode:`CALL_FUNCTION`, - :opcode:`CALL_FUNCTION_KW` and :opcode:`BUILD_MAP_UNPACK_WITH_CALL` opcodes + The :opcode:`MAKE_FUNCTION`, :opcode:`!CALL_FUNCTION`, + :opcode:`!CALL_FUNCTION_KW` and :opcode:`!BUILD_MAP_UNPACK_WITH_CALL` opcodes have been modified, the new :opcode:`CALL_FUNCTION_EX` and - :opcode:`BUILD_TUPLE_UNPACK_WITH_CALL` have been added, and + :opcode:`!BUILD_TUPLE_UNPACK_WITH_CALL` have been added, and ``CALL_FUNCTION_VAR``, ``CALL_FUNCTION_VAR_KW`` and ``MAKE_CLOSURE`` opcodes have been removed. (Contributed by Demur Rumed in :issue:`27095`, and Serhiy Storchaka in :issue:`27213`, :issue:`28257`.) -* The new :opcode:`SETUP_ANNOTATIONS` and :opcode:`STORE_ANNOTATION` opcodes +* The new :opcode:`SETUP_ANNOTATIONS` and :opcode:`!STORE_ANNOTATION` opcodes have been added to support the new :term:`variable annotation` syntax. (Contributed by Ivan Levkivskyi in :issue:`27985`.) diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index 2d433ef4759d52..f420fa5c04479b 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -2476,10 +2476,10 @@ avoiding possible problems use new functions :c:func:`PySlice_Unpack` and CPython bytecode changes ------------------------ -There are two new opcodes: :opcode:`LOAD_METHOD` and :opcode:`CALL_METHOD`. +There are two new opcodes: :opcode:`LOAD_METHOD` and :opcode:`!CALL_METHOD`. (Contributed by Yury Selivanov and INADA Naoki in :issue:`26110`.) -The :opcode:`STORE_ANNOTATION` opcode has been removed. +The :opcode:`!STORE_ANNOTATION` opcode has been removed. (Contributed by Mark Shannon in :issue:`32550`.) diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst index bdc4ca5cab5245..7aca35b2959cd2 100644 --- a/Doc/whatsnew/3.8.rst +++ b/Doc/whatsnew/3.8.rst @@ -2152,11 +2152,11 @@ CPython bytecode changes cleaning-up code for :keyword:`break`, :keyword:`continue` and :keyword:`return`. - Removed opcodes :opcode:`BREAK_LOOP`, :opcode:`CONTINUE_LOOP`, - :opcode:`SETUP_LOOP` and :opcode:`SETUP_EXCEPT`. Added new opcodes - :opcode:`ROT_FOUR`, :opcode:`BEGIN_FINALLY`, :opcode:`CALL_FINALLY` and - :opcode:`POP_FINALLY`. Changed the behavior of :opcode:`END_FINALLY` - and :opcode:`WITH_CLEANUP_START`. + Removed opcodes :opcode:`!BREAK_LOOP`, :opcode:`!CONTINUE_LOOP`, + :opcode:`!SETUP_LOOP` and :opcode:`!SETUP_EXCEPT`. Added new opcodes + :opcode:`!ROT_FOUR`, :opcode:`!BEGIN_FINALLY`, :opcode:`!CALL_FINALLY` and + :opcode:`!POP_FINALLY`. Changed the behavior of :opcode:`!END_FINALLY` + and :opcode:`!WITH_CLEANUP_START`. (Contributed by Mark Shannon, Antoine Pitrou and Serhiy Storchaka in :issue:`17611`.) diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst index 6118b02dd9bd48..b062e6b4c9bca0 100644 --- a/Doc/whatsnew/3.9.rst +++ b/Doc/whatsnew/3.9.rst @@ -1203,7 +1203,7 @@ Changes in the C API CPython bytecode changes ------------------------ -* The :opcode:`LOAD_ASSERTION_ERROR` opcode was added for handling the +* The :opcode:`!LOAD_ASSERTION_ERROR` opcode was added for handling the :keyword:`assert` statement. Previously, the assert statement would not work correctly if the :exc:`AssertionError` exception was being shadowed. (Contributed by Zackery Spytz in :issue:`34880`.)