-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-42197: Don't create f_locals
dictionary unless we actually need it.
#32055
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-42197: Don't create f_locals
dictionary unless we actually need it.
#32055
Conversation
…ger called during profile and tracing. (Contributed by Fabio Zadrozny)
@markshannon Is there a typo in the bpo number? bpo-42917 seems to be about the size limit of the block stack. |
f_locals
dictionary unless we actually need it.f_locals
dictionary unless we actually need it.
Misc/NEWS.d/next/Core and Builtins/2022-03-22-15-12-28.bpo-42197.SwrrFO.rst
Outdated
Show resolved
Hide resolved
…n calls to `PyFrame_FastToLocals` or `PyFrame_LocalsToFast`.
🤖 New build scheduled with the buildbot fleet by @markshannon for commit 281305b 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
Misc/NEWS.d/next/Core and Builtins/2022-03-22-15-12-28.bpo-42197.SwrrFO.rst
Outdated
Show resolved
Hide resolved
🤖 New build scheduled with the buildbot fleet by @markshannon for commit 0e452a1 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
The breaking change here is technically in scope for the two fast locals PEPs, but given that 3.11 is breaking that API anyway by making frame objects private, I agree it makes sense to just go ahead and make this change independently of those. +1 for PyFrame_GetLocals() as the replacement public API. |
Misc/NEWS.d/next/Core and Builtins/2022-03-22-15-12-28.bpo-42197.SwrrFO.rst
Show resolved
Hide resolved
…on do not show up after tracing.
This tiny change seems to double the speed of coverage.py https://bugs.python.org/issue42197#msg411210
Original implementation by @fabioz. I've dropped his modifications to the
sys
docs, as thef_locals
field is now internal, so should not be accessed directly: https://github.com/python/cpython/blob/main/Doc/whatsnew/3.11.rsthttps://bugs.python.org/issue42197