This is work in progress: basically co_names should be used (done)
But it seems that there are issues with the way the eval dict (globals/locals) is propagated. Indeed when an external symbol is compiled, the eval dict should not be propagated. Instead its own eval dict should be used. This is available through target.__globals__ for functions, but not for other symbols (classes...).
Not sure all of this is done correctly today but I actually do not have time to dedicate to it as I am not sure about the potential benefits :)
This is work in progress: basically
co_names
should be used (done)But it seems that there are issues with the way the eval dict (globals/locals) is propagated. Indeed when an external symbol is compiled, the eval dict should not be propagated. Instead its own eval dict should be used. This is available through
target.__globals__
for functions, but not for other symbols (classes...).Not sure all of this is done correctly today but I actually do not have time to dedicate to it as I am not sure about the potential benefits :)