Skip to content
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 5 commits into from
Nov 18, 2021

Conversation

jakelishman
Copy link
Member

@jakelishman jakelishman commented Nov 2, 2021

Summary

This causes imports of qiskit.util to raise a DeprecationWarning (it should be qiskit.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.

@jakelishman jakelishman requested a review from a team as a code owner November 2, 2021 15:00
@jakelishman jakelishman added Changelog: Deprecation Include in "Deprecated" section of changelog on hold Can not fix yet labels Nov 2, 2021
@jakelishman
Copy link
Member Author

No longer on hold, because the blockers are merged now.

@jakelishman jakelishman removed the on hold Can not fix yet label Nov 11, 2021
@jakelishman jakelishman added this to the 0.19 milestone Nov 11, 2021
@coveralls
Copy link

coveralls commented Nov 11, 2021

Pull Request Test Coverage Report for Build 1477836345

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.004%) to 82.542%

Files with Coverage Reduction New Missed Lines %
qiskit/pulse/library/waveform.py 3 90.38%
Totals Coverage Status
Change from base Build 1476902269: -0.004%
Covered Lines: 49851
Relevant Lines: 60395

💛 - Coveralls

qiskit/util.py Outdated Show resolved Hide resolved
qiskit/util.py Outdated Show resolved Hide resolved
@mergify mergify bot merged commit 5194605 into Qiskit:main Nov 18, 2021
@jakelishman jakelishman deleted the deprecate/util.py branch November 26, 2021 12:06
garrison added a commit to garrison/qiskit that referenced this pull request May 9, 2023
kevinhartman pushed a commit that referenced this pull request May 9, 2023
king-p3nguin pushed a commit to king-p3nguin/qiskit-terra that referenced this pull request May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Deprecation Include in "Deprecated" section of changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants