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

gh-121604: fix ResourceLoader deprecation warning message #128859

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

graingert
Copy link
Contributor

@graingert graingert commented Jan 15, 2025

@graingert graingert changed the title fix ResourceLoader deprecation warning gh-128007: fix ResourceLoader deprecation warning Jan 15, 2025
@graingert graingert changed the title gh-128007: fix ResourceLoader deprecation warning gh-121604: fix ResourceLoader deprecation warning Jan 15, 2025
@graingert graingert marked this pull request as ready for review January 15, 2025 10:33
@graingert graingert changed the title gh-121604: fix ResourceLoader deprecation warning gh-121604: fix ResourceLoader deprecation warning message Jan 15, 2025
Comment on lines 308 to 310
Loaders that wish to support resource reading should implement a
:meth:`get_resource_reader` method as specified by
:class:`importlib.resources.abc.ResourceReader`.
:class:`importlib.resources.abc.TraversableResources`.
Copy link
Member

Choose a reason for hiding this comment

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

No, it is documented in the importlib.resources.abc.ResourceReader description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But ResourceReader is scheduled for removal in 3.14

Copy link
Member

Choose a reason for hiding this comment

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

When ResourceReader has been removed, the documentation of its methods and of get_resource_reader() should be moved to the TraversableResources description. For now, get_resource_reader() is described with ResourceReader, and the code that implements get_resource_reader() returning ResourceReader still works (but emits a warning).

Copy link
Member

@tomasr8 tomasr8 Jan 15, 2025

Choose a reason for hiding this comment

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

Not anymore, see the later comments in #97850

(Responding to Thomas' comment)

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.

3 participants