FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-121604: fix ResourceLoader deprecation warning message by graingert · Pull Request #128859 · python/cpython · GitHub

Repository navigation

gh-121604: fix ResourceLoader deprecation warning message - #128859

Merged
brettcannon merged 5 commits into
python:mainfrom
graingert:fix-deprecation-warning
Jan 15, 2025
Merged

brettcannon merged 5 commits into
python:mainfrom
graingert:fix-deprecation-warning

Conversation

graingert commented Jan 15, 2025 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

graingert changed the title fix ResourceLoader deprecation warning gh-128007: fix ResourceLoader deprecation warning Jan 15, 2025
graingert changed the title gh-128007: fix ResourceLoader deprecation warning gh-121604: fix ResourceLoader deprecation warning Jan 15, 2025
graingert marked this pull request as ready for review January 15, 2025 10:33
graingert changed the title gh-121604: fix ResourceLoader deprecation warning gh-121604: fix ResourceLoader deprecation warning message Jan 15, 2025
Comment thread Doc/library/importlib.rst Outdated
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

But ResourceReader is scheduled for removal in 3.14

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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).

tomasr8 Jan 15, 2025 •
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Not anymore, see the later comments in #97850

(Responding to Thomas' comment)

brettcannon enabled auto-merge (squash) January 15, 2025 20:48
brettcannon merged commit d05140f into python:main Jan 15, 2025
graingert deleted the fix-deprecation-warning branch March 20, 2025 16:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL