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

Fix some importlib usages #2123

Merged
merged 1 commit into from
Nov 1, 2023
Merged

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Sep 21, 2023

See python/typeshed#10746 (comment) as to why importing directly from importlib shouldn't be relied on for importlib.machinery, importlib.util and importlib.abc.
Mypy & Pyright (see #2102) will also catch the two issues fixed here.

@@ -6,7 +6,7 @@
# when things go wrong - eg, not enough permissions to hit the
# registry etc.

import importlib
import importlib.machinery
Copy link
Collaborator Author

@Avasam Avasam Sep 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See python/typeshed#10746 (comment) as to why importing directly from importlib shouldn't be relied on for importlib.machinery, importlib.util and importlib.abc. Mypy & Pyright (see #2102) will also catch this.

@mhammond mhammond merged commit 4722923 into mhammond:main Nov 1, 2023
16 checks passed
@Avasam Avasam deleted the fix-importlib-usages branch November 1, 2023 17:51
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