-
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
Add full deprecation warning to util.py #7212
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jakelishman
added
Changelog: Deprecation
Include in "Deprecated" section of changelog
on hold
Can not fix yet
labels
Nov 2, 2021
This was referenced Nov 2, 2021
No longer on hold, because the blockers are merged now. |
Pull Request Test Coverage Report for Build 1477836345
💛 - Coveralls |
mtreinish
reviewed
Nov 17, 2021
releasenotes/notes/qiskit.util-louder-deprecation-135d9e9ead7ab396.yaml
Outdated
Show resolved
Hide resolved
mtreinish
approved these changes
Nov 18, 2021
garrison
added a commit
to garrison/qiskit
that referenced
this pull request
May 9, 2023
This is a follow up to Qiskit#7212
kevinhartman
pushed a commit
that referenced
this pull request
May 9, 2023
This is a follow up to #7212
king-p3nguin
pushed a commit
to king-p3nguin/qiskit-terra
that referenced
this pull request
May 22, 2023
This is a follow up to Qiskit#7212
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This causes imports of
qiskit.util
to raise aDeprecationWarning
(it should beqiskit.utils
). The module itself has been deprecated since #5420 (released in Terra 0.17), but due to the overrides of the deprecation warning handling (see #7204), we couldn't raise a deprecation warning here without Aer and friends' uses leaking out immediately to users.I added a reno for this to highlight it; there already was a reno in 0.17, but this might be the first time that downstream packages actually notice the deprecation.
Details and comments
This will cause a few more deprecation warnings to be seen at the top of the test suite (at least until Qiskit/qiskit-aer#1382 is released in a new version), but they won't fail the run because they're triggered during collection, before our test-runner code turns warnings into errors (edit: forgot about Sphinx!).
We shouldn't merge this unless #7204 (at least the
_filter_deprecation_warnings
bit of it) is in Terra to avoid leaking the extra warnings out to users. Also on hold til Qiskit/qiskit-aer#1382 merges.