gh-64019: Add missing module attribute in inspect table
See also https://docs.python.org/dev/library/importlib.html#importlib.machinery.ModuleSpec
- Issue: gh-64019
I personally think the table shouldn't exist in the first place. The common attributes for objects is not inspect-specific, and so this is an odd place to document such things. It also leads to it being out-of-date when folks don't even know about it. So my preference it to instead remove the entire table.
Barring that, __cached__, __package__, and __loader__ should not be documented as they are deprecated in Python 3.12.
I see, what about removing the table section on modules and adding a sentence above it linking to https://docs.python.org/dev/reference/import.html#import-related-module-attributes? It would preserve the info in this page if needed and avoid having two sources of information.
see, what about removing the table section on modules and adding a sentence above it linking
Works for me!
I considered putting it at the bottom, but since the module was at the top of the table I didn't want to move it too far away. But it does look a bit awkward, especially if more sections if the table will be removed, so if others feel the same I have no problem with moving it down.
(I'm working my way through some PRs which have been approved and are labeled "awaiting merge", hence my seemingly bolt from the blue comment. Why? Read here.)
This has been idle for awhile. It's been approved by @ericsnowcurrently and @JelleZijlstra. @brettcannon is there any reason not to merge?
is there any reason not to merge?
Nope, just not at the top of my review queue. 😅
Thanks @slateny for the PR, and @brettcannon for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. 🐍🍒⛏🤖
Sorry @slateny and @brettcannon, I had trouble checking out the 3.11 backport branch.
Please retry by removing and re-adding the "needs backport to 3.11" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker 7d2dcc53d09fe903329926bf7bbfe460b1465dab 3.11
GH-99782 is a backport of this pull request to the 3.10 branch.
I had trouble checking out the
3.11backport branch.
Due to the backport problem I am going to close the 3.10 branch to make backporting easier. But I'm also not going to worry about backporting to 3.11 since this is a minor clean-up. If someone wants to create a PR for 3.11 I'm willing to review, but I have too much other PRs to review to do the backport myself.
Thanks @slateny for the PR, and @brettcannon for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. 🐍🍒⛏🤖
GH-99783 is a backport of this pull request to the 3.11 branch.
Thanks @slateny for the PR, and @brettcannon for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. 🐍🍒⛏🤖
I had trouble checking out the
3.11backport branch.Due to the backport problem I am going to close the 3.10 branch to make backporting easier. But I'm also not going to worry about backporting to 3.11 since this is a minor clean-up. If someone wants to create a PR for 3.11 I'm willing to review, but I have too much other PRs to review to do the backport myself.
Removing and re-adding the label fixed the problem! (It usually does, whenever miss-islington says "I had trouble checking out the branch" rather than "I couldn't do the backport, there was a merge conflict".)
Thanks @slateny for the PR, and @brettcannon for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. 🐍🍒⛏🤖