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

wcsaxes tests fail with "The collections attribute was deprecated in Matplotlib 3.8" #15003

Closed
pllim opened this issue Jun 30, 2023 · 3 comments · Fixed by #15004
Closed

wcsaxes tests fail with "The collections attribute was deprecated in Matplotlib 3.8" #15003

pllim opened this issue Jun 30, 2023 · 3 comments · Fixed by #15004

Comments

@pllim
Copy link
Member

pllim commented Jun 30, 2023

devdeps job is failing for 5 tests with this message:

Matplotlib: 3.8.0.dev1437+g3b3fc57f65

matplotlib._api.deprecation.MatplotlibDeprecationWarning:
The collections attribute was deprecated in Matplotlib 3.8 and
will be removed two minor releases later.
  • astropy/visualization/wcsaxes/tests/test_misc.py::test_no_numpy_warnings[contours]
  • astropy/visualization/wcsaxes/tests/test_misc.py::test_grid_type_contours_transform
  • astropy/visualization/wcsaxes/tests/test_misc.py::test_contour_return
  • astropy/visualization/wcsaxes/tests/test_misc.py::test_contour_empty
  • astropy/visualization/wcsaxes/tests/test_misc.py::test_multiple_draws_grid_contours

for line in self._grid.collections:

for line in self._grid.collections:

Any ideas how to fix? @astrofrog @Cadair @dstansby @ayshih 🙏

Probably from matplotlib/matplotlib#25247

@dstansby
Copy link
Contributor

Is there a longer stack trace for the error than posted above? (where perhaps it's easier to see where the warning is coming from)

@dstansby
Copy link
Contributor

If it's a ContourSet emitting these, https://github.com/matplotlib/matplotlib/pull/25247/files#diff-918125f8b0a3d8085b15096d948f8e005d5dc938ea54501ba3c1f7a36ad74f7f is the MPL changelog entry that has info on how to change code to adapt to this.

@pllim
Copy link
Member Author

pllim commented Jun 30, 2023

That change log isn't very helpful for me who is unfamiliar with the code base, but I think I found the PR so looking at their diff, I am trying out #15004 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants