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

Non-existing class in importlib #96845

Closed
pchanial opened this issue Sep 15, 2022 · 2 comments · Fixed by #97515
Closed

Non-existing class in importlib #96845

pchanial opened this issue Sep 15, 2022 · 2 comments · Fixed by #97515
Assignees
Labels
docs Documentation in the Doc dir topic-importlib

Comments

@pchanial
Copy link

pchanial commented Sep 15, 2022

Documentation

The documentation for 3.9 and 3.10 about the importlib package mentions the class importlib.resources.abc.Traversable, which only exists since 3.11. Instead, the importlib.abc.Traversable should be mentionned.

@pchanial pchanial added the docs Documentation in the Doc dir label Sep 15, 2022
@jaraco
Copy link
Member

jaraco commented Sep 23, 2022

My intention was always for this class to be in the resources namespace, but that didn't happen until #90276. My preference, for maximum compatibility, would be to expose the class in importlib.resources.abc even for old Pythons, to honor the documented location, but I realize now that's not readily achievable because importlib.resources is a simple module prior to Python 3.11 and thus doesn't support submodules. In #93610 (comment), I indicated that I meant for the location of Traversable to be an implementation detail prior to 3.11.

jaraco added a commit to jaraco/cpython that referenced this issue Sep 23, 2022
jaraco added a commit to jaraco/cpython that referenced this issue Sep 23, 2022
jaraco added a commit to jaraco/cpython that referenced this issue Sep 23, 2022
jaraco added a commit to jaraco/cpython that referenced this issue Sep 23, 2022
@jaraco jaraco linked a pull request Sep 23, 2022 that will close this issue
jaraco added a commit that referenced this issue Oct 3, 2022
* [3.10] gh-96845: Correct reference to Traversable* classes.

* [3.10] gh-96845: Add a note about the pending move of resources.abcs.
ambv pushed a commit that referenced this issue Oct 4, 2022
…H-97761)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
@jaraco jaraco closed this as completed Oct 16, 2022
@jaraco
Copy link
Member

jaraco commented Oct 16, 2022

Docs have been updated to reflect the reality of the situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir topic-importlib
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants