]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-114480: Add docs for f_trace_opcodes behavior on 3.12 (#114540)
authorTian Gao <gaogaotiantian@hotmail.com>
Sun, 4 Feb 2024 22:27:17 +0000 (14:27 -0800)
committerGitHub <noreply@github.com>
Sun, 4 Feb 2024 22:27:17 +0000 (22:27 +0000)
Doc/library/sys.rst

index 4bd769ea9ae59dd7b027041718c3c167b9264ff8..198422307bace48e5940ba4754e8732c798d3f36 100644 (file)
@@ -1644,6 +1644,12 @@ always available.
       ``'opcode'`` event type added; :attr:`~frame.f_trace_lines` and
       :attr:`~frame.f_trace_opcodes` attributes added to frames
 
+   .. versionchanged:: 3.12
+      ``'opcode'`` event will only be emitted if :attr:`~frame.f_trace_opcodes`
+      of at least one frame has been set to :const:`True` before :func:`settrace`
+      is called. This behavior will be changed back in 3.13 to be consistent with
+      previous versions.
+
 .. function:: set_asyncgen_hooks([firstiter] [, finalizer])
 
    Accepts two optional keyword arguments which are callables that accept an