-
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
Fix warning on __qiskit_version__
#10686
Fix warning on __qiskit_version__
#10686
Conversation
The warning emitted by the `QiskitVersion` class that backs the `__qiskit_version__` variable was previously set to warn on instantiation, not usage. This caused the warning to trigger during library import, rather than at the site of usage.
One or more of the the following people are requested to review this:
|
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.
This LGTM, in my review on #10242 I was mainly concerned at the time that it didn't show up on import. But I realize I missed the stacklevel
kwarg there so it was never actually visible with the default filters and was always triggering. Thanks for catching and fixing this.
Yeah, I caught it because |
* Fix warning on `__qiskit_version__` The warning emitted by the `QiskitVersion` class that backs the `__qiskit_version__` variable was previously set to warn on instantiation, not usage. This caused the warning to trigger during library import, rather than at the site of usage. * Add warning assertion to test (cherry picked from commit 4ab2ef8)
* Fix warning on `__qiskit_version__` The warning emitted by the `QiskitVersion` class that backs the `__qiskit_version__` variable was previously set to warn on instantiation, not usage. This caused the warning to trigger during library import, rather than at the site of usage. * Add warning assertion to test (cherry picked from commit 4ab2ef8) Co-authored-by: Jake Lishman <[email protected]>
* Fix warning on `__qiskit_version__` The warning emitted by the `QiskitVersion` class that backs the `__qiskit_version__` variable was previously set to warn on instantiation, not usage. This caused the warning to trigger during library import, rather than at the site of usage. * Add warning assertion to test
Summary
The warning emitted by the
QiskitVersion
class that backs the__qiskit_version__
variable was previously set to warn on instantiation, not usage. This caused the warning to trigger during library import, rather than at the site of usage.Details and comments
Originally introduced in #10242.