-
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
Pin ipywidgets #9272
Pin ipywidgets #9272
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:
|
Pull Request Test Coverage Report for Build 3656342382
💛 - Coveralls |
8e3f295
to
f94becc
Compare
I'm a bit confused by this warning: I can reproduce it with running the test but not if I use the function that gives rise to the warning directly: >>> from qiskit.providers.fake_provider import FakeParis
>>> from qiskit.visualization import plot_error_map
>>> plot_error_map(FakeParis()) # this raises the warning in the test it seems
<Figure size 2400x1800 with 5 Axes> # no warning here! In the |
Yes, the condition looks complicated. This PR jupyter-widgets/ipywidgets#3569 introduced it. But I haven't figured out it yet. |
Looking at that code it is definitely an issue with ipywidgets (I'm inclined to think it's a bug in their stack inspection code added in that PR) and/or seaborn. The test itself isn't doing anything suspicious in that all that is happening is that seaborn is getting imported as part of the visualization code and triggering a deprecation warning which we treat as fatal in the test suite (so we update our code when an upstream project deprecates an api. If we don't want to pin ipywidgets here the other option is to add the deprecation warnings to the exclude list: https://github.com/Qiskit/qiskit-terra/blob/main/qiskit/test/base.py#L190-L226 which I think is also valid in this case |
# ipywidgets 8.0.3 started emitting deprecation warnings via a seaborn import. | ||
# This pin can be removed when compatibility with those packages is fixed. | ||
ipywidgets<8.0.3 |
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.
Was there a case just pinning in the requirements list wasn't enough and we needed to pin it in the constraints file too?
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 line upgrades ipywidgets to 8.0.3 without this change of constraints.txt.
https://github.com/Qiskit/qiskit-terra/blob/ee4a5712bfac6104e3e93fc8a3ff845a3a0ddd77/.azure/test-linux.yml#L156
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.
We probably don't need the requirements-dev.txt change in parallel then. But it doesn't hurt anything either.
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.
Ah, you are right... I didn't have to change in parallel.
Thank you for looking at the code, Matthew. I didn't know about |
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'm fine with pinning it's just for testing so that works as well as anything else as long as we remember to circle back after the warnings are fixed
(cherry picked from commit b4f4c34)
* fix tox.ini (#9276) (cherry picked from commit e70ce50) # Conflicts: # tox.ini * Fix merge conflict * pin ipywidgets (#9272) (cherry picked from commit b4f4c34) Co-authored-by: Takashi Imamichi <[email protected]> Co-authored-by: Jake Lishman <[email protected]> Co-authored-by: Takashi Imamichi <[email protected]>
These were originally added in Qiskit#9105 and Qiskit#9272 respectively, but the original problem package `seaborn` has released since then, which may have fixed things.
These were originally added in Qiskit#9105 and Qiskit#9272 respectively, but the original problem package `seaborn` has released since then, which may have fixed things. This removes some now-unnecessary suppressions from image-related packages, and adds the new suppression for the pyzmq problem, which is Jupyter's domain to handle. The extra environment variable in the images test run is to eagerly move to new default behaviour starting in jupyter-core 6; there is no need for us to pin the package too low, since this warning is just encouraging people to proactively test the new behaviour, and it doesn't cause our suite problems.
These were originally added in Qiskit#9105 and Qiskit#9272 respectively, but the original problem package `seaborn` has released since then, which may have fixed things. This removes some now-unnecessary suppressions from image-related packages, and adds the new suppression for the pyzmq problem, which is Jupyter's domain to handle. The extra environment variable in the images test run is to eagerly move to new default behaviour starting in jupyter-core 6; there is no need for us to pin the package too low, since this warning is just encouraging people to proactively test the new behaviour, and it doesn't cause our suite problems.
These were originally added in Qiskit#9105 and Qiskit#9272 respectively, but the original problem package `seaborn` has released since then, which may have fixed things. This removes some now-unnecessary suppressions from image-related packages, and adds the new suppression for the pyzmq problem, which is Jupyter's domain to handle. The extra environment variable in the images test run is to eagerly move to new default behaviour starting in jupyter-core 6; there is no need for us to pin the package too low, since this warning is just encouraging people to proactively test the new behaviour, and it doesn't cause our suite problems.
* Relax constraints on jupyter-core and ipywidgets These were originally added in #9105 and #9272 respectively, but the original problem package `seaborn` has released since then, which may have fixed things. * Fix suppressions for Jupyter warnings This removes some now-unnecessary suppressions from image-related packages, and adds the new suppression for the pyzmq problem, which is Jupyter's domain to handle. The extra environment variable in the images test run is to eagerly move to new default behaviour starting in jupyter-core 6; there is no need for us to pin the package too low, since this warning is just encouraging people to proactively test the new behaviour, and it doesn't cause our suite problems. * Use correct YAML syntax One day I'll remember this when writing environment variables in YAML files, but it's not this day.
* Fix NumPy 1.24.0 compatibility and pin `coverage<7.0` (#9305) * fix Kraus from (array, None) * fix triu_to_dense test * fix instruction comparison * skip snobfit if numpy 1.24.0 or above is installed Co-authored-by: ElePT <[email protected]> * pin coverage <7.0 * add links to Kraus and snobfit issues * retrigger CI Co-authored-by: ElePT <[email protected]> (cherry picked from commit 9733fc0) * Update `qiskit.utils.wrap_method` for Python 3.11 (#9310) * Revert "[Test] Pin maximum python version in CI to <3.11.1 (#9296)" This reverts commit 07e0a2f. * Do not treat __init_subclass__ as a special type method * Release note * Apply suggestions from code review Co-authored-by: Julien Gacon <[email protected]> * Use inspect.getattr_static to bypass descriptor call * Update release note * Update wrap_method test * Adjust wording on release note Co-authored-by: Julien Gacon <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 0344a1c) * Relax constraints on jupyter-core and ipywidgets (#9364) These were originally added in #9105 and #9272 respectively, but the original problem package `seaborn` has released since then, which may have fixed things. This removes some now-unnecessary suppressions from image-related packages, and adds the new suppression for the pyzmq problem, which is Jupyter's domain to handle. The extra environment variable in the images test run is to eagerly move to new default behaviour starting in jupyter-core 6; there is no need for us to pin the package too low, since this warning is just encouraging people to proactively test the new behaviour, and it doesn't cause our suite problems. * Refactor coverage CI workflow (#9361) This relaxes the constraint on `coverage` added in #9305. The issue there is actually the now unmaintained `coveragepy-lcov` package is not compatible with Coverage.py 7.0. However, we only needed `coveragepy-lcov` to convert Coverage's format into LCOV, which is a feature Coverage has had itself since version 6.0. This commit also updates some parts of the coverage workflow that were old: - there are new versions of the Actions `checkout` and `setup-python`, which swap to using Node 16 rather than Node 12, which is deprecated in GHA - `grcov` is packaged and installable from `cargo` now, rather than needing a manual hard-coded pull from GitHub - we can have `grcov` only keep the parts we care about immediately, rather than converting everything and later discarding it Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 7955d92) Co-authored-by: Julien Gacon <[email protected]> Co-authored-by: Will Shanks <[email protected]>
Summary
ipywidgets 8.0.3 (released on Dec 7 link) raises a deprecation warning as follows.
Details and comments