-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
importlib.abc.TraversableReader is not implemented #88361
Comments
7f7e706 introduced the files() api and documented a importlib.abc.TraversableReader protocol, but it did not implement it. This class is documented and marked as introduced in 3.9, but it's actually missing. |
I don't believe a |
We do implement the protocol, and not TraversableResources, in some places, such as DegenerateFiles for eg. It seems to me that maybe that is an issue and we actually want to inherit from TraversableResources. The question here is, are people supposed to be implementing readers with just files(), or are they always expected to inherit TraversableResources? Regardless of the usefulness in code, please also consider type hinting. If people are expecting to be using this protocol, we should expose it. |
A resource provider could potentially implement only the If a provider only implemented I decided not to present both
Perhaps. What advantage would that have?
Agreed, there are some places where type hints would drastically improve readability.
My instinct is |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: