Skip to content

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!

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