Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid leaking "name" variable in AbstractSandbox #4280

Merged

Conversation

Avasam
Copy link
Contributor

@Avasam Avasam commented Mar 15, 2024

Summary of changes

This was noticed in typeshed:
https://github.com/python/typeshed/blob/449f70f1f1bc787eb56699a5ce153c3efbfe2f4f/stubs/setuptools/%40tests/stubtest_allowlist.txt#L40-L41

Before:

>>> from setuptools.sandbox import AbstractSandbox
>>> AbstractSandbox.name
'tmpnam'

After:

>>> from setuptools.sandbox import AbstractSandbox
>>> AbstractSandbox.name
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: type object 'AbstractSandbox' has no attribute 'name'

Pull Request Checklist

@Avasam Avasam force-pushed the leaked-name-variable-in-AbstractSandbox branch from d71d637 to 2b339b9 Compare March 15, 2024 04:53
@abravalheri abravalheri merged commit 683ad33 into pypa:main Apr 16, 2024
23 checks passed
@abravalheri
Copy link
Contributor

Thank you very much!

@Avasam Avasam deleted the leaked-name-variable-in-AbstractSandbox branch April 16, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants