Skip to content

Commit 27cacdd

Browse files
[3.12] gh-114480: Add docs for f_trace_opcodes behavior on 3.12 (#114540)
1 parent 89fd795 commit 27cacdd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Doc/library/sys.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,6 +1644,12 @@ always available.
16441644
``'opcode'`` event type added; :attr:`~frame.f_trace_lines` and
16451645
:attr:`~frame.f_trace_opcodes` attributes added to frames
16461646

1647+
.. versionchanged:: 3.12
1648+
``'opcode'`` event will only be emitted if :attr:`~frame.f_trace_opcodes`
1649+
of at least one frame has been set to :const:`True` before :func:`settrace`
1650+
is called. This behavior will be changed back in 3.13 to be consistent with
1651+
previous versions.
1652+
16471653
.. function:: set_asyncgen_hooks([firstiter] [, finalizer])
16481654

16491655
Accepts two optional keyword arguments which are callables that accept an

0 commit comments

Comments
 (0)