-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
gh-118359: Add notes for Bdb.user_call #118368
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
Conversation
This is a rather simple one, @AlexWaygood could you maybe take a look at this? Thanks! |
Doc/library/bdb.rst
Outdated
@@ -240,6 +240,11 @@ The :mod:`bdb` module also defines two classes: | |||
Called from :meth:`dispatch_call` if a break might stop inside the | |||
called function. | |||
|
|||
.. note:: |
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.
The note
directive is too loud. If we don't want to attract special attention to an important note, we usually write a note as a plain text.
Should not there be a versionchanged
directive for this change?
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.
So we want to just add this as a normal text to the method. The versionchanged
would probably be 2.x or 1.x, do we really want to search for the exact version?
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 agree with just adding as normal text, without the .. note::
directive. I think if the parameter really has been unused for 25 years, it's okay to not have a .. versionchanged
directive.
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.
We only add versionadded
directives for 3.x changes. If it has been always unused in Python 3, no versionadded
directive is needed. But mention this in the commit message.
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.
The commit message into main is generated when the PR is squash merged so I don't think I can do that now.
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.
Either I or Serhiy (whoever merges this) will have the ability to edit the commit message when squash-merging the PR
Doc/library/bdb.rst
Outdated
@@ -240,6 +240,11 @@ The :mod:`bdb` module also defines two classes: | |||
Called from :meth:`dispatch_call` if a break might stop inside the | |||
called function. | |||
|
|||
.. note:: | |||
|
|||
*argument_list* is not used anymore and will always be :data:`None`. |
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.
BTW, Note
is usually formatted as ``Note``
.
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.
You meant None
?
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.
Yes, None
.
The "# XXX 'arg' is no longer used" comment referred to in #118359 (comment) appears to be this one: Line 126 in 98739c9
The comment appears to have been there for 25 years. Just to make sure I understand correctly: does that mean that this parameter has been unused for 25 years? |
Maybe. I know that argument is not used since I started playing with |
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.
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.
Thanks!
Thanks @gaogaotiantian for the PR, and @AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
The `argument_list` parameter of bdb.Bdb.user_call has been useless for 25 years. It is retained for backwards compatibility, but it will always be None. (cherry picked from commit 8e4fb5d) Co-authored-by: Tian Gao <[email protected]>
GH-118410 is a backport of this pull request to the 3.12 branch. |
gh-118359: Improve docs for Bdb.user_call (GH-118368) The `argument_list` parameter of bdb.Bdb.user_call has been useless for 25 years. It is retained for backwards compatibility, but it will always be None. (cherry picked from commit 8e4fb5d) Co-authored-by: Tian Gao <[email protected]>
The `argument_list` parameter of bdb.Bdb.user_call has been useless for 25 years. It is retained for backwards compatibility, but it will always be None.
The `argument_list` parameter of bdb.Bdb.user_call has been useless for 25 years. It is retained for backwards compatibility, but it will always be None.
argument_list
ofbdb.Bdb.user_call
will always beNone
now.bdb.Bdb.user_call
API #118359📚 Documentation preview 📚: https://cpython-previews--118368.org.readthedocs.build/