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

bpo-37459: importlib docs improperly reference get_resource_loader() #14568

Merged
merged 2 commits into from
Jul 4, 2019

Conversation

aldwinaldwin
Copy link
Contributor

@aldwinaldwin aldwinaldwin commented Jul 3, 2019

Gregory Szorc: "The documentation in importlib.rst says that a loader should implement get_resource_loader(fullname). This is the only occurrence of get_resource_loader in the CPython source tree. It should be changed to get_resource_reader()."

https://bugs.python.org/issue37459

Copy link
Contributor

@aeros aeros left a comment

Choose a reason for hiding this comment

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

Approved, verified that this is the only reference to get_resource_loader(fullname) across the cpython repository. Based on the described functionality, get_resource_reader() seems to be the appropriate replacement.

@@ -500,7 +500,7 @@ ABC hierarchy::
packages or a module).

Loaders that wish to support resource reading are expected to
provide a method called ``get_resource_loader(fullname)`` which
provide a method called ``get_resource_reader()`` which
Copy link
Member

Choose a reason for hiding this comment

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

Please restore the fullname argument here.

Copy link
Member

@warsaw warsaw left a comment

Choose a reason for hiding this comment

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

Thanks for the fix; one change is needed.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Copy link
Member

@warsaw warsaw left a comment

Choose a reason for hiding this comment

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

Thanks!

@miss-islington
Copy link
Contributor

Thanks @aldwinaldwin for the PR, and @warsaw for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒⛏🤖

@bedevere-bot
Copy link

@warsaw: Please replace # with GH- in the commit message next time. Thanks!

@bedevere-bot
Copy link

GH-14580 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 4, 2019
…ythonGH-14568)

* bpo-37459: importlib docs improperly reference get_resource_loader()
(cherry picked from commit b607d99)

Co-authored-by: aldwinaldwin <aldwinaldwin@users.noreply.github.com>
@bedevere-bot
Copy link

GH-14581 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 4, 2019
…ythonGH-14568)

* bpo-37459: importlib docs improperly reference get_resource_loader()
(cherry picked from commit b607d99)

Co-authored-by: aldwinaldwin <aldwinaldwin@users.noreply.github.com>
warsaw pushed a commit that referenced this pull request Jul 4, 2019
…H-14568) (GH-14580)

* bpo-37459: importlib docs improperly reference get_resource_loader()
(cherry picked from commit b607d99)

Co-authored-by: aldwinaldwin <aldwinaldwin@users.noreply.github.com>
warsaw pushed a commit that referenced this pull request Jul 4, 2019
…H-14568) (GH-14581)

* bpo-37459: importlib docs improperly reference get_resource_loader()
(cherry picked from commit b607d99)

Co-authored-by: aldwinaldwin <aldwinaldwin@users.noreply.github.com>
@aeros
Copy link
Contributor

aeros commented Jul 4, 2019

@warsaw Good catch, I should've searched the repository for get_resource_reader() to make sure, I had assumed that method was only using a self arg. Line 272 of zimimport.py clearly shows otherwise: def get_resource_reader(self, fullname):``. I definitely need to learn to scrutinize everything in order to provide more constructive reviews. My apologies.

@warsaw
Copy link
Member

warsaw commented Jul 5, 2019

No worries @aeros167 ! Thanks for helping out!

lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
…ython#14568)

* bpo-37459: importlib docs improperly reference get_resource_loader()
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
…ython#14568)

* bpo-37459: importlib docs improperly reference get_resource_loader()
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 skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants