-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Uppercase Qiskit
in deprecation warnings
#13452
base: main
Are you sure you want to change the base?
Conversation
One or more of the following people are relevant to this code:
|
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.
Yesss, been wanting to do it for a long time. 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.
I like this change from a user perspective.
I think we should make sure that the signature / documented use of deprecate_func
lines up with the new expected usage.
Looks like the tests need updating to look for the new string.
@@ -26,7 +26,7 @@ def deprecate_func( | |||
since: str, | |||
additional_msg: str | None = None, | |||
pending: bool = False, | |||
package_name: str = "qiskit", | |||
package_name: str = "Qiskit", |
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 docstring for this argument indicates that it ought to be the PyPI package name. Assuming we want to make this change, we ought to update the docstring (and probably the arg name as well, e.g. package_description
).
Do we use deprecate_func
for packages other than Qiskit at this point? If not, perhaps we should just remove the argument altogether and hard-code "Qiskit"
within.
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.
Yeah I stumbled over this too... I'd prefer not to change the argument name for backwards compatibility (and avoid using @deprecate_arg
on this 😂), but we should change the description. Maybe
package_name: The name shown in the deprecation message (use e.g. the PyPI package name).
?
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.
Updated in 5dd8262, along with a test that setting package_name
works as expected
Pull Request Test Coverage Report for Build 11917311198Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Summary
This is a suggestion to change the default deprecation message to use
Qiskit 1.x
instead ofqiskit 1.x
, since we commonly refer to this package in uppercase spelling.Details and comments
This means the message is changed e.g. from
to
The old format can still be obtained by explicitly setting
package_name="qiskit"
in the deprecation decorators.