On 3/27/21 4:23 PM, Jelle Zijlstra wrote:
Now, PEP 649 doesn't actually fix this at the moment, since it still resolves all annotations in the global scope, but that's easily fixed by removing the special case in https://github.com/larryhastings/co_annotations/blob/co_annotations/Python/compile.c#L3815.


Maybe not "easily fixed", because in my experience dealing with the compiler and symtable modules in CPython, nothing is easy.  That special case was instrumental in getting the first revision working.

Nevertheless, you're right in that it shouldn't be necessary, and "round 2" of 649 will remove it.


Cheers,


/arry