On Sat, 30 Jan 2021, 10:55 pm Nick Coghlan, <ncogh...@gmail.com> wrote:

>
>
> On Sat, 30 Jan 2021, 10:18 pm Mark Shannon, <m...@hotpy.org> wrote:
>
>>
>>
>
>> The break in compatibility with locals() seems much more intrusive, yet
>> you are OK with that (as am I).
>>
>
> PyEval_GetLocals() is part of the stable ABI and returns a borrowed
> reference. That means there are a lot of implementation restrictions around
> keeping that API working. A follow-up PEP could propose deprecating and
> removing the API as intrinsically broken, but I don't want to go that far
> in PEP 558.
>

After sleeping on this, I'm now convinced that you're right, and we can
reasonably drop the "stash extra info in the frame locals snapshot" feature
from the *new* optimised frame locals C API.

What I realised is that even if we don't offer that feature on the new
frame locals proxy type, the *old* C API can still support it, unless &
until that API is deprecated, as PyEval_GetLocals() bypasses the new API
and accesses the frame state directly.

Cheers,
Nick.






>>
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/VED6ZQSXVXEEDBB4M3UBICZNONEHBASH/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to