◐ Shell
clean mode source ↗

bpo-42197: Don't create `f_locals` dictionary unless we actually need it. by markshannon · Pull Request #32055 · python/cpython

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.