-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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-30535: Explicitly note that sys.meta_path is not empty #13300
Conversation
Doc/library/sys.rst
Outdated
@@ -926,7 +926,8 @@ always available. | |||
|
|||
A list of :term:`meta path finder` objects that have their | |||
:meth:`~importlib.abc.MetaPathFinder.find_spec` methods called to see if one | |||
of the objects can find the module to be imported. The | |||
of the objects can find the module to be imported. by default, holds entries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not grammatically correct: a sentence should start with a capital letter and contain a verb.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, how about
"By default, it holds entries to handle the standard kinds of modules (.py files, extension modules...)."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically there aren't different kinds of modules, just different ways of storing code. I have suggested a tweak to the wording.
@@ -926,7 +926,8 @@ always available. | |||
|
|||
A list of :term:`meta path finder` objects that have their | |||
:meth:`~importlib.abc.MetaPathFinder.find_spec` methods called to see if one | |||
of the objects can find the module to be imported. The | |||
of the objects can find the module to be imported. By default, it holds entries | |||
to handle the standard kinds of modules (.py files, extension modules...). The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to handle the standard kinds of modules (.py files, extension modules...). The | |
that implement Python's default import semantics. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brettcannon Do you think we should add examples after that. Like:
that implement Python's default import semantics. (BuiltinImporter, FrozenImporter, and PathFinder)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, as that's too easy of a thing to forget to update. Plus there's no guarantee that every interpreter will set up sys.meta_path
the same.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the docs should get too specific as interpreters can choose what to put into sys.meta_path
.
@Windsooon, please take a look at the review comments. Thanks! |
Changes were requested by a core dev over two years ago, but have not been made. I am therefore closing this PR. @Windsooon, if you're still interested in working on this, feel free to open a new PR. Alternatively, ping me, and I'll happily reopen this PR. Thanks! 🙂 |
I tried to updated this PR with Brett's comment but I don't think I can. I will create a new PR. |
Explicitly note that sys.meta_path is not empty
https://bugs.python.org/issue30535