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

bpo-41006: importlib.util no longer imports typing #20938

Merged
merged 1 commit into from
Jun 17, 2020
Merged

bpo-41006: importlib.util no longer imports typing #20938

merged 1 commit into from
Jun 17, 2020

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jun 17, 2020

Create importlib._abc submodule to avoid importing typing when
importlib.util is imported. Move Loader ABC into importlib._abc.

https://bugs.python.org/issue41006

Create importlib._abc submodule to avoid importing typing when
importlib.util is imported. Move Loader ABC into importlib._abc.
@vstinner
Copy link
Member Author

vstinner commented Jun 17, 2020

Another approach would be to move Traversable and TraversableReader classes to importlib.readers, but it seems like importlib.readers is not documented.

I chose to write a PR which doesn't affect the importlib API.

The from typing import Protocol, runtime_checkable line was added to Lib/importlib/abc.py by the commit 7f7e706 of bpo-39791.

cc @jaraco

@vstinner
Copy link
Member Author

3 hours later, no Travis CI build was created. I close/reopen my PR to force Travis CI to schedule a new build.

@vstinner vstinner closed this Jun 17, 2020
@vstinner vstinner reopened this Jun 17, 2020
@vstinner vstinner merged commit 9e09849 into python:master Jun 17, 2020
@vstinner vstinner deleted the importlib_typing branch June 17, 2020 21:16
@vstinner
Copy link
Member Author

Thanks for the review @brettcannon!

arun-mani-j pushed a commit to arun-mani-j/cpython that referenced this pull request Jul 21, 2020
Create importlib._abc submodule to avoid importing typing when
importlib.util is imported. Move Loader ABC into importlib._abc.
ammaraskar added a commit to ammaraskar/cpython that referenced this pull request Aug 31, 2020
Dark-Feather pushed a commit to Dark-Feather/bitbot that referenced this pull request May 8, 2023
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