You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee=Noneclosed_at=<Date2020-10-03.21:49:56.503>created_at=<Date2020-09-23.12:22:04.951>labels= ['3.8', '3.7', 'library', '3.9', '3.10']
title='[regression] symtable.Symbol.is_local() is no longer True for bound global symbols'updated_at=<Date2020-10-03.21:50:03.298>user='https://github.com/CendioOssman'
So bpo-40196 (and PR 19391) broke things for us here as Symbol.is_local() no longer works properly for symbols on the global/module scope.
Previously it would return True for all global symbols that were bound. Now it only returns True when the symbol is not used in any other scope. This means we cannot tell the difference between globals that are from the module itself, and globals that come in via imports.
This also seems to contradict this part of the language reference:
"(The variables of the module code block are local and global.)"
Indeed, there are a bunch of problems here taking into account the language reference "The variables of the module code block are local and global". PR 22391 fixes those and also the repr-generation for module-level that was also broken