Skip to content

Commit 49bd5c3

Browse files
authored
Update newsfragments/3108.bugfix.rst
1 parent 5ba9bd8 commit 49bd5c3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

newsfragments/3108.bugfix.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
avoid materializing frame.f_locals in KI protection code, this causes locals to persist in the frame.f_locals snapshot even if they are deleted on 3.12 and below
1+
Rework KeyboardInterrupt protection to track code objects, rather than frames,
2+
as protected or not. This should substantially reduce its overhead, and also fixes
3+
an issue with the previous implementation: locals' lifetimes will no longer be
4+
extended by materialization in the ``frame.f_locals`` dictionary that the previous
5+
KI protection logic needed to access to do its work.

0 commit comments

Comments
 (0)