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

Pin pyparsing<3 in constraints #7174

Merged
merged 1 commit into from Oct 25, 2021
Merged

Conversation

jakelishman
Copy link
Member

Matplotlib's LaTeX handling is broken by the new release of pyparsing
3.0. We are already restricting matplotlib<3.4 in CI due to
deprecations, so we are unlikely to get updated versions of matplotlib
any time soon, which we will likely need to lift the pin.

Summary

Details and comments

Matplotlib's LaTeX handling is broken by the new release of pyparsing
3.0.  We are already restricting matplotlib<3.4 in CI due to
deprecations, so we are unlikely to get updated versions of matplotlib
any time soon, which we will likely need to lift the pin.
@jakelishman jakelishman requested a review from a team as a code owner October 25, 2021 09:07
@jakelishman jakelishman added automerge Changelog: None Do not include in changelog labels Oct 25, 2021
@jakelishman
Copy link
Member Author

@mtreinish: for when you're online: I've put this in constraints not requirements, because pyparsing is only a transitive dependency, and in general for users it'll be matplotlib managing the dependencies, not us. Merging now to get CI rolling, but we can change it around if you think it'd be better elsewhere.

@mergify mergify bot merged commit 6e0926f into Qiskit:main Oct 25, 2021
mtreinish added a commit to mtreinish/qiskit-core that referenced this pull request Oct 25, 2021
In matplotlib 3.4.0 released on 03/26/2021 there were some deprecations
around our use of Axes3d in the state visualization and bloch sphere
modules. Fixing our usage to avoid these deprecations was previously
attempted in Qiskit#6136 and Qiskit#6087 but we did not move forward there because
the supported API we need to use matplotlib 3.3.0 when it was
introduced. We previously did not want to raise our minimum supported
matplotlib version to 3.3.0 to accomodate this. However, recent changes
in transitive dependency of mpl, pyparsing, caused an incompatibility
when running with older mpl versions around mathtex. To fix that we
had to pin pyparsing in the constraints file (see Qiskit#7174). It appears
that now is a better time to raise our minimum version because the
burden of trying to keep support for older matplotlib versions is higher
than it once was.

This commit bumps the minimum matplotlib version to 3.3.0, updates the
usage of Axes3d to avoid the deprecated usage in matplotlib 3.4.0, and
removes the contraints pinning introduced in Qiskit#7174. This should get us
on supported releases for matplotlib moving forward and it'll hopefully
be a while before we encounter this kind of version issue in the future.

Fixes Qiskit#6136
mergify bot added a commit that referenced this pull request Oct 28, 2021
* Bump minimum matplotlib version to 3.3.0

In matplotlib 3.4.0 released on 03/26/2021 there were some deprecations
around our use of Axes3d in the state visualization and bloch sphere
modules. Fixing our usage to avoid these deprecations was previously
attempted in #6136 and #6087 but we did not move forward there because
the supported API we need to use matplotlib 3.3.0 when it was
introduced. We previously did not want to raise our minimum supported
matplotlib version to 3.3.0 to accomodate this. However, recent changes
in transitive dependency of mpl, pyparsing, caused an incompatibility
when running with older mpl versions around mathtex. To fix that we
had to pin pyparsing in the constraints file (see #7174). It appears
that now is a better time to raise our minimum version because the
burden of trying to keep support for older matplotlib versions is higher
than it once was.

This commit bumps the minimum matplotlib version to 3.3.0, updates the
usage of Axes3d to avoid the deprecated usage in matplotlib 3.4.0, and
removes the contraints pinning introduced in #7174. This should get us
on supported releases for matplotlib moving forward and it'll hopefully
be a while before we encounter this kind of version issue in the future.

Fixes #6136

* Run black

* Restore constraints pinning

I was under the mistaken impression that the current mpl releases were
compatible with pyparsing3, but looking at the linked mpl issue it's not
fixed yet only for their development so far. So to unblock CI this
restores the pinning as it's still needed until mpl releases a fix.

* Fix matplotlib 3.3.x compat

* Fix version string comparison typing

* Fix typo

* Fix second `ax` typo

* Fix gatemap tests with newer matplotlib

* Fix lint

Co-authored-by: Jake Lishman <jake@binhbar.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@jakelishman jakelishman deleted the ci/pin-pyparsing branch November 1, 2021 15:16
@kdk kdk added this to the 0.19 milestone Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants