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

Clarify the pkgutil.walk_packages() note #59493

Closed
cjerdonek opened this issue Jul 7, 2012 · 6 comments
Closed

Clarify the pkgutil.walk_packages() note #59493

cjerdonek opened this issue Jul 7, 2012 · 6 comments
Labels
docs Documentation in the Doc dir easy

Comments

@cjerdonek
Copy link
Member

BPO 15288
Nosy @brettcannon, @cjerdonek, @rlamy

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:

assignee = None
closed_at = <Date 2012-07-09.18:11:20.495>
created_at = <Date 2012-07-07.18:15:57.291>
labels = ['easy', 'docs']
title = 'Clarify the pkgutil.walk_packages() note'
updated_at = <Date 2012-07-09.18:48:42.156>
user = 'https://github.com/cjerdonek'

bugs.python.org fields:

activity = <Date 2012-07-09.18:48:42.156>
actor = 'brett.cannon'
assignee = 'docs@python'
closed = True
closed_date = <Date 2012-07-09.18:11:20.495>
closer = 'brett.cannon'
components = ['Documentation']
creation = <Date 2012-07-07.18:15:57.291>
creator = 'chris.jerdonek'
dependencies = []
files = []
hgrepos = []
issue_num = 15288
keywords = ['easy']
message_count = 6.0
messages = ['164916', '164959', '165096', '165102', '165103', '165106']
nosy_count = 5.0
nosy_names = ['brett.cannon', 'chris.jerdonek', 'docs@python', 'python-dev', 'Ronan.Lamy']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue15288'
versions = ['Python 3.3']

@cjerdonek
Copy link
Member Author

The note at the end of the pkgutil.walk_packages() (and iter_modules()) documentation can be improved somewhat:

http://docs.python.org/dev/library/pkgutil.html#pkgutil.walk_packages

For example, "importers" aren't referenced earlier in the documentation of the function, so it's not immediately clear what they are referring to. I also think that enough information should be given so that one can run the examples given and have them work. They currently don't.

I can put together proposed wording. See the bpo-14982 discussion for background.

@cjerdonek cjerdonek added docs Documentation in the Doc dir easy labels Jul 7, 2012
@brettcannon
Copy link
Member

Probably linking the term "importers" into the glossary should be enough.

@rlamy
Copy link
Mannequin

rlamy mannequin commented Jul 9, 2012

It seems that most, if not all, uses of "importer" in pkgutil refer to finders, e.g. ImpImporter is a actually only a finder, not an importer. So s/importer/finder/ is needed, and perhaps also a note explaining that ImpImporter isn't in fact an importer, in addition to glossary links.

@python-dev
Copy link
Mannequin

python-dev mannequin commented Jul 9, 2012

New changeset 96f7926ea444 by Brett Cannon in branch 'default':
Issue bpo-15288: Clarify that pkgutil.walk_packages() and friends will no
http://hg.python.org/cpython/rev/96f7926ea444

@brettcannon
Copy link
Member

I changed to term to "loader" and linked to the glossary. I also added a versionchanged note for Python 3.3 so people are not too surprised that pkgutil no longer does what it did in Python 3.2.

@brettcannon
Copy link
Member

Ronan is right that it is all about finders, not importers per-se. I fixed the docs to not say "loader".

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
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 easy
Projects
None yet
Development

No branches or pull requests

2 participants