bpo-42197: Disable automatic update of frame locals during tracing by fabioz · Pull Request #23028 · python/cpython · GitHub
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Doc/library/sys.rst
9 changes: 9 additions & 0 deletions Doc/whatsnew/3.10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,9 @@ Optimizations
bytecode level. It is now around 100% faster to create a function with parameter
annotations. (Contributed by Yurii Karabas and Inada Naoki in :issue:`42202`)

* `PyFrame_FastToLocalsWithError` and `PyFrame_LocalsToFast` are no longer called during profile and tracing.
(Contributed by Fabio Zadrozny in :issue:`issue42197`)

Deprecated
==========

Expand Down Expand Up @@ -656,6 +659,12 @@ Porting to Python 3.10
bugs like ``if (PyList_SET_ITEM (a, b, c) < 0) ...`` test.
(Contributed by Zackery Spytz and Victor Stinner in :issue:`30459`.)

* `PyFrame_FastToLocalsWithError` and `PyFrame_LocalsToFast` are no longer
called before and after the trace or profile function, so, they must now
be explicitly called when manipulating `PyFrameObject.f_locals`.
(Contributed by Fabio Zadrozny in :issue:`issue42197`)


Deprecated
----------

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
`PyFrame_FastToLocalsWithError` and `PyFrame_LocalsToFast` are no longer
called during profile nor tracing. To inspect the `PyFrameObject.f_locals` member,
debuggers and profilers implemented in C must now call `PyFrame_FastToLocalsWithError`
to update locals and `PyFrame_LocalsToFast` after `PyFrameObject.f_locals` are updated.
5 changes: 0 additions & 5 deletions Python/sysmodule.c