-
Notifications
You must be signed in to change notification settings - Fork 127
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
Fix MarkerStyle for matplotlib compatibility #1113
Conversation
this single change allows qiskit_experiments to work for matplotlib 3.7 ``` venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/__init__.py:68: in <module> from . import library venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/library/__init__.py:116: in <module> from .calibration import ( venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/library/calibration/__init__.py:62: in <module> from .rough_frequency import RoughFrequencyCal venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/library/calibration/rough_frequency.py:20: in <module> from qiskit_experiments.library.characterization.qubit_spectroscopy import QubitSpectroscopy venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/library/characterization/__init__.py:79: in <module> from .analysis import ( venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/library/characterization/analysis/__init__.py:15: in <module> from .drag_analysis import DragCalAnalysis venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/library/characterization/analysis/drag_analysis.py:20: in <module> import qiskit_experiments.curve_analysis as curve venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/curve_analysis/__init__.py:553: in <module> from .base_curve_analysis import BaseCurveAnalysis venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/curve_analysis/base_curve_analysis.py:31: in <module> from qiskit_experiments.visualization import ( venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/visualization/__init__.py:71: in <module> from .drawers import BaseDrawer, LegacyCurveCompatDrawer, MplDrawer venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/visualization/drawers/__init__.py:15: in <module> from .legacy_curve_compat_drawer import LegacyCurveCompatDrawer venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/visualization/drawers/legacy_curve_compat_drawer.py:20: in <module> from qiskit_experiments.curve_analysis.visualization import BaseCurveDrawer venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/curve_analysis/visualization/__init__.py:25: in <module> from .mpl_drawer import MplCurveDrawer venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/curve_analysis/visualization/mpl_drawer.py:36: in <module> class MplCurveDrawer(BaseCurveDrawer): venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/curve_analysis/visualization/mpl_drawer.py:39: in MplCurveDrawer DefaultMarkers = MarkerStyle().filled_markers venvs/s/581f024a/venv/lib/python3.9/site-packages/matplotlib/markers.py:261: in __init__ _api.warn_deprecated( venvs/s/581f024a/venv/lib/python3.9/site-packages/matplotlib/_api/deprecation.py:96: in warn_deprecated warn_external(warning, category=MatplotlibDeprecationWarning) venvs/s/581f024a/venv/lib/python3.9/site-packages/matplotlib/_api/__init__.py:388: in warn_external warnings.warn(message, category, stacklevel) E matplotlib._api.deprecation.MatplotlibDeprecationWarning: Calling MarkerStyle() with no parameters is deprecated since 3.6; support will be removed two minor releases later. Use MarkerStyle('') to construct an empty MarkerStyle. ```
|
I closed a competing PR (#1130) in favour of just pushing this one through (@coruscating). diff --git a/releasenotes/notes/mpl-36-markerstyle-c6b51652b08991a5.yaml b/releasenotes/notes/mpl-36-markerstyle-c6b51652b08991a5.yaml
new file mode 100644
index 0000000..eeb5e8e
--- /dev/null
+++ b/releasenotes/notes/mpl-36-markerstyle-c6b51652b08991a5.yaml
@@ -0,0 +1,5 @@
+---
+fixes:
+ - |
+ Removed no-argument construction of `matplotlib.markers.MarkerStyle` for
+ [compatibility with matplotlib>=3.6](https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.6.0.html#positional-keyword-arguments). |
@rbuckland Thanks for contributing. Can you sign the CLA? |
Done |
@rbuckland What do you think about the proposed change? We'd like to include this in the next bug fix release in the next week or two, and if you can write a short release note describing the fix, that would be great. |
@rbuckland Unless you have objections, I will update this PR with @ihincks's proposed changes and the release note. |
Co-authored-by: Ian Hincks <ian.hincks@gmail.com>
this single change allows qiskit_experiments to work for matplotlib 3.7 ``` venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/__init__.py:68: in <module> from . import library venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/library/__init__.py:116: in <module> from .calibration import ( venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/library/calibration/__init__.py:62: in <module> from .rough_frequency import RoughFrequencyCal venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/library/calibration/rough_frequency.py:20: in <module> from qiskit_experiments.library.characterization.qubit_spectroscopy import QubitSpectroscopy venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/library/characterization/__init__.py:79: in <module> from .analysis import ( venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/library/characterization/analysis/__init__.py:15: in <module> from .drag_analysis import DragCalAnalysis venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/library/characterization/analysis/drag_analysis.py:20: in <module> import qiskit_experiments.curve_analysis as curve venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/curve_analysis/__init__.py:553: in <module> from .base_curve_analysis import BaseCurveAnalysis venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/curve_analysis/base_curve_analysis.py:31: in <module> from qiskit_experiments.visualization import ( venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/visualization/__init__.py:71: in <module> from .drawers import BaseDrawer, LegacyCurveCompatDrawer, MplDrawer venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/visualization/drawers/__init__.py:15: in <module> from .legacy_curve_compat_drawer import LegacyCurveCompatDrawer venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/visualization/drawers/legacy_curve_compat_drawer.py:20: in <module> from qiskit_experiments.curve_analysis.visualization import BaseCurveDrawer venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/curve_analysis/visualization/__init__.py:25: in <module> from .mpl_drawer import MplCurveDrawer venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/curve_analysis/visualization/mpl_drawer.py:36: in <module> class MplCurveDrawer(BaseCurveDrawer): venvs/s/581f024a/venv/lib/python3.9/site-packages/qiskit_experiments/curve_analysis/visualization/mpl_drawer.py:39: in MplCurveDrawer DefaultMarkers = MarkerStyle().filled_markers venvs/s/581f024a/venv/lib/python3.9/site-packages/matplotlib/markers.py:261: in __init__ _api.warn_deprecated( venvs/s/581f024a/venv/lib/python3.9/site-packages/matplotlib/_api/deprecation.py:96: in warn_deprecated warn_external(warning, category=MatplotlibDeprecationWarning) venvs/s/581f024a/venv/lib/python3.9/site-packages/matplotlib/_api/__init__.py:388: in warn_external warnings.warn(message, category, stacklevel) E matplotlib._api.deprecation.MatplotlibDeprecationWarning: Calling MarkerStyle() with no parameters is deprecated since 3.6; support will be removed two minor releases later. Use MarkerStyle('') to construct an empty MarkerStyle. ``` ### Summary matplotlib API changes in 3.7 ### Details and comments Some details that should be in this section include: qiskit_experiments has a warning if this change it not made. - E matplotlib._api.deprecation.MatplotlibDeprecationWarning: Calling MarkerStyle() with no parameters is deprecated since 3.6; support will be removed two minor releases later. Use MarkerStyle('') to construct an empty MarkerStyle. ### PR checklist (delete when all criteria are met) - [X] I have read the contributing guide `CONTRIBUTING.md`. - [X] I have added the tests to cover my changes. - [X] I have updated the documentation accordingly. - [X] I have added a release note file using `reno` if this change needs to be documented in the release notes. --------- Co-authored-by: Helena Zhang <hadron.diaspora@gmail.com> Co-authored-by: Ian Hincks <ian.hincks@gmail.com> Co-authored-by: Helena Zhang <helena.zhang@ibm.com> (cherry picked from commit 7a1fb78)
This is an automatic backport of pull request #1113 done by [Mergify](https://mergify.com). Co-authored-by: Ramon Buckland <rbuckland@users.noreply.github.com>
this single change allows qiskit_experiments to work for matplotlib 3.7
Summary
matplotlib API changes in 3.7
Details and comments
Some details that should be in this section include:
qiskit_experiments has a warning if this change it not made.
PR checklist (delete when all criteria are met)
CONTRIBUTING.md
.reno
if this change needs to be documented in the release notes.