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
GitHub fields:
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
New changeset fb0a465 by Pablo Galindo in branch 'master': bpo-41840: Report module-level globals as both local and global in the symtable module (GH-22391) fb0a465
New changeset 7b7aa94 by Pablo Galindo in branch '3.9':
[3.9] bpo-41840: Report module-level globals as both local and global in the symtable module (GH-22391). (GH-22528) 7b7aa94
New changeset fd22823 by Pablo Galindo in branch '3.8':
[3.8] bpo-41840: Report module-level globals as both local and global in the symtable module (GH-22391). (GH-22529) fd22823
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
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: