-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
gh-64019: Add missing module attribute in inspect table #98116
Conversation
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.
Looks good.
@ericsnowcurrently would you like to take a look since you reviewed the previous version of 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.
LGTM
However, before merging, I recommend you get the opinion of @warsaw and @brettcannon; they are currently working on removing some of these attributes.
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 think #65961 is the correct issue for the deprecations/removals.
A
I personally think the table shouldn't exist in the first place. The common attributes for objects is not Barring that, |
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. |
Works for me! |
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.
LGTM
FWIW, it might be more clear to move the new sentence (parenthetical reference) to below the table, but I'll leave that to your (or others') discretion.
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? |
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 |
GH-99782 is a backport of this pull request to the 3.10 branch. |
… attributes instead of listing them (pythonGH-98116) (cherry picked from commit 7d2dcc5) Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com> Co-authored-by: Michael Anckaert <michael.anckaert@sinax.be>
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. |
… attributes instead of listing them (pythonGH-98116) (cherry picked from commit 7d2dcc5) Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com> Co-authored-by: Michael Anckaert <michael.anckaert@sinax.be>
Thanks @slateny for the PR, and @brettcannon for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. |
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. |
See also https://docs.python.org/dev/library/importlib.html#importlib.machinery.ModuleSpec