Skip to content

Use raw instead of png for font manager memory leak test #25569

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

Merged
merged 2 commits into from
Mar 30, 2023

Conversation

ksunden
Copy link
Member

@ksunden ksunden commented Mar 28, 2023

PR Summary

Some versions of Pillow (notably v9.2.0 is what I had installed) trigger a
failure on this test that looks the same as if it was a failure on our own part.
v9.4.0 of Pillow does not have the same behavior, hence CI does not catch it.

This changes to svg to avoid the external dependency triggering the failure.
The fontmanager lookup that we are explicitly trying to test here does still
trigger for svg output, but the pillow generated one does not

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

Some versions of Pillow (notably v9.2.0 is what I had installed) trigger a failure on this test that looks the same as if it was a failure on our own part. v9.4.0 of Pillow does not have the same behavior, hence CI does not catch it.

This changes to svg to avoid the external dependency triggering the failure. The fontmanager lookup that we are explicitly trying to test here does still trigger for svg output, but the pillow generated one does not
@QuLogic
Copy link
Member

QuLogic commented Mar 28, 2023

Would it be safer to output with format='raw'?

@tacaswell tacaswell added this to the v3.8.0 milestone Mar 29, 2023
@tacaswell
Copy link
Member

I agree raw would be better here. Would still run it through Agg (which I am 95% sure is faster) rather than the svg backend (which does oodles of text formatting).

@tacaswell tacaswell changed the title Use svg instead of png for font manager memory leak test Use raw instead of png for font manager memory leak test Mar 30, 2023
@QuLogic QuLogic merged commit e305953 into matplotlib:main Mar 30, 2023
@ksunden ksunden deleted the font_man_memtest branch March 30, 2023 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants