Skip to content

bpo-46546: remove method_name var leak from importlib.DeprecatedList#30956

Closed
sobolevn wants to merge 1 commit into
python:mainfrom
sobolevn:issue-46546
Closed

bpo-46546: remove method_name var leak from importlib.DeprecatedList#30956
sobolevn wants to merge 1 commit into
python:mainfrom
sobolevn:issue-46546

Conversation

@sobolevn

@sobolevn sobolevn commented Jan 27, 2022

Copy link
Copy Markdown
Member

@AlexWaygood

Copy link
Copy Markdown
Member

Unrelated to this specific PR, but related to the problem in general: there's a small list of global-variable name leaks here that you might be interested in ;)

I think the inspect entries on that list have already been fixed by the addition of __all__ in #30003 on the main branch, but explicitly del-ing those names from globals might be a good idea for 3.10 and 3.9, given that it's essentially a bug that these names are exposed, and those branches accept bugfixes.

@sobolevn

Copy link
Copy Markdown
Member Author

Thanks! I was using astpath './/For/parent::body/parent::ClassDef' to inspect classes with for in bodies, I think I can easily adapt it to use Module as well!

@sobolevn

Copy link
Copy Markdown
Member Author

Replaced by python/importlib_metadata#365

@sobolevn sobolevn closed this Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants