Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
gh-112266: Remove(if defined)
part from__dict__
and__weakref__
docstrings#112268
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…akref__` docstrings
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 like this change. While I don't personally find the existing text unclear, I can see how it could be confusing for some. This change also makes the docstrings more concise, which is generally a good thing; and I honestly don't think the "(if defined)" really provides any additional information, anyway.
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.
There is ambiguity of whether it applies to the dictionary, or the instance variables, so fine to remove it.
Backport? This seems like a docs fix, or a bug fix, both which should be backported. |
I suppose itcould break people's tests if they're asserting the exact output of |
Thanks@sobolevn for the PR, and@AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
Sorry,@sobolevn and@AlexWaygood, I could not cleanly backport this to
|
…akref__` docstrings (pythonGH-112268)(cherry picked from commitf812914)Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
GH-112270 is a backport of this pull request to the3.12 branch. |
Are you okay to take care of the 3.11 backport,@sobolevn? :) |
Yes, will do later |
…d `__weakref__` docstrings (pythonGH-112268)
GH-112276 is a backport of this pull request to the3.11 branch. |
Sphinx says 👋 Their tests have started failing on 3.11-3.13, they have some: assert' list of weak references to the object (if defined)'inactual https://github.com/sphinx-doc/sphinx/actions/runs/7158385030/job/19490408092?pr=11791 I'll open a PR to fix their tests with a |
Created PRsphinx-doc/sphinx#11793. |
…akref__` docstrings (python#112268)
…akref__` docstrings (python#112268)
Uh oh!
There was an error while loading.Please reload this page.
The PR is quite straight-forward, but I think that others should decide on which wording is best:
help()
on types has strange(if defined)
notice for attributes that are defined #112266