-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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-101100: Fix reference warnings for __getitem__
#110118
Conversation
__getitem__
__getitem__
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.
Previously, there was no need to add the object.
prefix. All object
methods were automatically found. I don't know why it broke and from where. If someone could fix this, it would save us from rewriting a lot of references.
Do you have a rough idea of when it was working? (2010? 2015? 2020?) I could look at this, but unbounded I fear it'd be a fairly time consuming activity. Prepending references with Perhaps of interest, this is a table of the frequency of dunder attributes that cause reference warnings (I've filtered a little but not properly):
A |
Perhaps it worked 10 years ago. There were more Python specific code in Doc/tools/extensions, and Sphinx itself was more Python-oriented. Or maybe it was just a legend, I don't remember. |
It perhaps worked by accident on old Sphinx versions. |
LGTM. @AA-Turner, are you going to create a separate PR for every dunder method? Some lines contain references to several dunder methods (for example |
Thanks @AA-Turner for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
GH-111073 is a backport of this pull request to the 3.12 branch. |
GH-111074 is a backport of this pull request to the 3.11 branch. |
…) (#111073) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
…) (#111074) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
📚 Documentation preview 📚: https://cpython-previews--110118.org.readthedocs.build/