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

MAINT: close the figures before backend change #145

Merged
merged 1 commit into from
Mar 12, 2024
Merged

Conversation

ev-br
Copy link
Member

@ev-br ev-br commented Mar 7, 2024

MPL 3.8 issues a DeprecationWarning, follow its suggestion:

scpdt/tests/test_testfile.py::test_one_scipy_tutorial
Auto-close()ing of figures upon backend switching is deprecated since 3.8 and will be removed two minor releases later. To suppress this warning, explicitly call plt.close('all') first.
matplotlib.use('Agg')

Found while looking at gh-131

MPL 3.8 issues a DeprecationWarning, follow its suggestion
@Sheila-nk
Copy link
Collaborator

LGTM! 🚀

@Sheila-nk
Copy link
Collaborator

I'm not sure if you can see the same warning locally:

scpdt/tests/test_testfile.py::test_linalg_clone
  <doctest scipy_linalg_tutorial_clone.rst[69]>:1: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown

but is it possible to silence this warning as well in this PR or a follow-up PR?

@ev-br
Copy link
Member Author

ev-br commented Mar 12, 2024

A follow-up sounds good.

@ev-br ev-br merged commit f00b7c7 into main Mar 12, 2024
4 checks passed
@ev-br ev-br deleted the mpl_depwarning branch March 12, 2024 10:04
@ev-br
Copy link
Member Author

ev-br commented Mar 12, 2024

Thanks for the review Sheila!

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

Successfully merging this pull request may close these issues.

2 participants