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
sysdocs, as thef_localsfield 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