Fix deprecation warning for deprecated_functionality#8851
Conversation
|
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the the following people are requested to review this:
|
mtreinish
left a comment
There was a problem hiding this comment.
Lol, I haven't gone through the release notes yet, I didn't realize that we deprecated a deprecation decorator. I find that quite amusing
This LGTM, thanks for identifying and fixing this.
I found it confusing that the PR that did this (#8696) didn't have a single joke in it. |
|
When I saw I thought for sure that there must have been an off-by-one error in the |
Pull Request Test Coverage Report for Build 3236527215
💛 - Coveralls |
|
Lint is failing because |
|
Sigh, our import "tree" is kind of a disaster it looks like the root cause is that the utils path is shared with the new decorator and the quantum instance (which imports everything because it's a big layer violation). I think the best way to handle this is probably to just avoid the decorator and emit the warning inline with the desired text. |
|
While writing the warning string, I learned that these |
|
It looks like reno is getting confused by the merge commit which moved a bunch of release notes in #8850 and is causing it to get confused about the source of release notes. I think the only way to fix that is to rebase the branch on main and force push it to your fork so that reno can track the history with the file moves. |
7470555 to
f84f1b0
Compare
jakelishman
left a comment
There was a problem hiding this comment.
I'd love to have the time to go through Terra and reorganise the imports such that there's a proper import-time hierarchy, places that import "higher" in the hierarchy only do it at runtime, and it's all enforced by lint, but it's such a complex task, I've no idea when that would become possible. This seems sensible in the interim.
* Fix deprecation warning for `deprecated_functionality` * Emit the deprecation warning inline to avoid cyclic import Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 43cf42e)
* Fix deprecation warning for `deprecated_functionality` * Emit the deprecation warning inline to avoid cyclic import Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 43cf42e) Co-authored-by: Jim Garrison <garrison@ibm.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Summary
This fixes some deprecation warnings that pop up during my use of
main(or, equivalently,qiskit-terra==0.22.0rc1)Details and comments