Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
gh-101100: Consolidate documentation on
ModuleType
attributes #124709New 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-101100: Consolidate documentation on
ModuleType
attributes #124709Changes from all commits
6dabc1b
854de81
997895d
d23c6be
404d5a9
1228634
f128c69
250d17a
f9bf9c0
02a8169
9cf64d3
fd67e0a
309a9cf
2dca569
7716393
d68fb58
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 763 in Doc/glossary.rst
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.
What more should we say about
load_module()
and these attributes? The preview just says thatload_module()
is deprecated since 3.4 but I think it should have a stronger admonition -- at least a slated removal in 3.14. Possibly also saying that the attributes other than__name__
and__file__
will be removed from the module object in 3.14.CC: @brettcannon
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.
FYI, https://docs.python.org/3/deprecations/pending-removal-in-3.15.html#pending-removal-in-python-3-15 says that
__package__
and__cached__
are due for removal in 3.15, not 3.14. (And that's nothing to do with me -- they said that before this PR! 😉)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'm slightly loath to add too many details about the individual attributes to the docs for
load_module
, since this PR is predicated on the principle that each attribute should have canonical docs in a single location 😉 Ideally users would click on the links and find out about the deprecation notices from the datamodel docs.But, I added inline notes for the deprecated attributes in d68fb58