Skip to content

Commit 12e7cd8

Browse files
bpo-32565: Add missed versionadded directives for all new opcodes. (#5199)
1 parent ab32875 commit 12e7cd8

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

Doc/library/dis.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,16 @@ The Python compiler currently generates the following bytecode instructions.
339339

340340
Duplicates the reference on top of the stack.
341341

342+
.. versionadded:: 3.2
343+
342344

343345
.. opcode:: DUP_TOP_TWO
344346

345347
Duplicates the two references on top of the stack, leaving them in the
346348
same order.
347349

350+
.. versionadded:: 3.2
351+
348352

349353
**Unary operations**
350354

@@ -555,11 +559,14 @@ the original TOS1.
555559
the CO_ITERABLE_COROUTINE flag, or resolves
556560
``o.__await__``.
557561

562+
.. versionadded:: 3.5
563+
558564

559565
.. opcode:: GET_AITER
560566

561567
Implements ``TOS = TOS.__aiter__()``.
562568

569+
.. versionadded:: 3.5
563570
.. versionchanged:: 3.7
564571
Returning awaitable objects from ``__aiter__`` is no longer
565572
supported.
@@ -570,17 +577,23 @@ the original TOS1.
570577
Implements ``PUSH(get_awaitable(TOS.__anext__()))``. See ``GET_AWAITABLE``
571578
for details about ``get_awaitable``
572579

580+
.. versionadded:: 3.5
581+
573582

574583
.. opcode:: BEFORE_ASYNC_WITH
575584

576585
Resolves ``__aenter__`` and ``__aexit__`` from the object on top of the
577586
stack. Pushes ``__aexit__`` and result of ``__aenter__()`` to the stack.
578587

588+
.. versionadded:: 3.5
589+
579590

580591
.. opcode:: SETUP_ASYNC_WITH
581592

582593
Creates a new frame object.
583594

595+
.. versionadded:: 3.5
596+
584597

585598

586599
**Miscellaneous opcodes**
@@ -618,6 +631,8 @@ the original TOS1.
618631
Calls ``dict.setitem(TOS1[-i], TOS, TOS1)``. Used to implement dict
619632
comprehensions.
620633

634+
.. versionadded:: 3.1
635+
621636
For all of the :opcode:`SET_ADD`, :opcode:`LIST_APPEND` and :opcode:`MAP_ADD`
622637
instructions, while the added value or key/value pair is popped off, the
623638
container object remains on the stack so that it is available for further
@@ -640,6 +655,7 @@ iterations of the loop.
640655

641656
.. versionadded:: 3.3
642657

658+
643659
.. opcode:: SETUP_ANNOTATIONS
644660

645661
Checks whether ``__annotations__`` is defined in ``locals()``, if not it is
@@ -649,6 +665,7 @@ iterations of the loop.
649665

650666
.. versionadded:: 3.6
651667

668+
652669
.. opcode:: IMPORT_STAR
653670

654671
Loads all symbols not starting with ``'_'`` directly from the module TOS to
@@ -694,6 +711,8 @@ iterations of the loop.
694711
store it in (a) variable(s) (:opcode:`STORE_FAST`, :opcode:`STORE_NAME`, or
695712
:opcode:`UNPACK_SEQUENCE`).
696713

714+
.. versionadded:: 3.2
715+
697716

698717
.. opcode:: WITH_CLEANUP_START
699718

@@ -924,23 +943,31 @@ All of the following opcodes use their arguments.
924943

925944
If TOS is true, sets the bytecode counter to *target*. TOS is popped.
926945

946+
.. versionadded:: 3.1
947+
927948

928949
.. opcode:: POP_JUMP_IF_FALSE (target)
929950

930951
If TOS is false, sets the bytecode counter to *target*. TOS is popped.
931952

953+
.. versionadded:: 3.1
954+
932955

933956
.. opcode:: JUMP_IF_TRUE_OR_POP (target)
934957

935958
If TOS is true, sets the bytecode counter to *target* and leaves TOS on the
936959
stack. Otherwise (TOS is false), TOS is popped.
937960

961+
.. versionadded:: 3.1
962+
938963

939964
.. opcode:: JUMP_IF_FALSE_OR_POP (target)
940965

941966
If TOS is false, sets the bytecode counter to *target* and leaves TOS on the
942967
stack. Otherwise (TOS is true), TOS is popped.
943968

969+
.. versionadded:: 3.1
970+
944971

945972
.. opcode:: JUMP_ABSOLUTE (target)
946973

@@ -1013,6 +1040,8 @@ All of the following opcodes use their arguments.
10131040
consulting the cell. This is used for loading free variables in class
10141041
bodies.
10151042

1043+
.. versionadded:: 3.4
1044+
10161045

10171046
.. opcode:: STORE_DEREF (i)
10181047

@@ -1025,6 +1054,8 @@ All of the following opcodes use their arguments.
10251054
Empties the cell contained in slot *i* of the cell and free variable storage.
10261055
Used by the :keyword:`del` statement.
10271056

1057+
.. versionadded:: 3.2
1058+
10281059

10291060
.. opcode:: RAISE_VARARGS (argc)
10301061

0 commit comments

Comments
 (0)