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

hotfix: support matplotlib 3.3.0 #2754

Merged
merged 3 commits into from
Jul 18, 2020

Conversation

neutrinoceros
Copy link
Member

@neutrinoceros neutrinoceros commented Jul 17, 2020

PR Summary

fix #2752
I also simplified call_png_write_png since it had two required positional arguments that were actually not used.

@neutrinoceros neutrinoceros added bug api-consistency naming conventions, code deduplication, informative error messages, code smells... labels Jul 17, 2020
@neutrinoceros
Copy link
Member Author

matplotlib's version is currently pinned to 3.1.3 in our test requirements, maybe it's time to bump it ?

_png.write_png(buffer, fileobj, dpi)
try:
# matplotlib switched from an internal submodule _png to using pillow (PIL)
# between v3.1.0 and v3.3.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good solution for the imports. Thanks for adding the message too for our future devs. 🙂

with open(filename, "wb") as fileobj:
call_png_write_png(buffer, width, height, fileobj, dpi)
call_png_write_png(buffer, fileobj, dpi)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why the width and height were passed to the previous function when it seems like it didn't use them? Thanks for cleaning that up.

@neutrinoceros neutrinoceros force-pushed the hotfix_mpl3.3_support branch from ba74175 to 6a5b6b1 Compare July 17, 2020 19:31
@munkm munkm merged commit a6ad121 into yt-project:master Jul 18, 2020
@neutrinoceros neutrinoceros deleted the hotfix_mpl3.3_support branch July 21, 2020 12:27
matthewturk added a commit to matthewturk/yt that referenced this pull request Jul 31, 2020
@matthewturk matthewturk mentioned this pull request Jul 31, 2020
munkm pushed a commit that referenced this pull request Sep 14, 2020
munkm pushed a commit to munkm/yt that referenced this pull request Sep 16, 2020
neutrinoceros added a commit that referenced this pull request Sep 16, 2020
@ax3l ax3l mentioned this pull request Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-consistency naming conventions, code deduplication, informative error messages, code smells... bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Matplotlib 3.3.0 Breaks _png
4 participants