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

Fix AttributeError with Pillow >= 10.0 #580

Merged
merged 1 commit into from
Jul 22, 2023
Merged

Fix AttributeError with Pillow >= 10.0 #580

merged 1 commit into from
Jul 22, 2023

Conversation

cgohlke
Copy link
Contributor

@cgohlke cgohlke commented Jul 16, 2023

The deprecated Image.ANTIALIAS constant was removed in Pillow 10.0. See https://pillow.readthedocs.io/en/stable/deprecations.html#constants

@molinav
Copy link
Member

molinav commented Jul 17, 2023

Hi @cgohlke! Thanks for your contribution, I will try to accept the merge request as soon as possible.

I need to check if Image.LANCZOS is available only on recent pillow versions or if the name has been there for a while. Otherwise I will need to update the PR change to something like getattr(Image, "LANCZOS", "ANTIALIAS").

The error in the GitHub actions is unrelated to your change, I am also trying to find a solution.

@cgohlke
Copy link
Contributor Author

cgohlke commented Jul 17, 2023

Image.LANCZOS was added in Pillow 2.7.0, released Dec 31, 2014. See python-pillow/Pillow@43d5d06

@molinav
Copy link
Member

molinav commented Jul 22, 2023

@cgohlke Sorry for the late reply. Thanks for digging into the pillow history. This constant name is really coming from very long ago, so it should be perfectly safe to apply the PR.

As I mentioned some days before, the workflow is failing but due to an unrelated problem, which I am currently looking at. Being the PR merged into the develop branch, this change would appear in the basemap release 1.4.0.

@molinav molinav merged commit b6dd552 into matplotlib:develop Jul 22, 2023
@molinav
Copy link
Member

molinav commented Jul 23, 2023

In the end I backported this bugfix to the hotfix-1.3.8 branch, so it will also be available for the basemap release 1.3.8.

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.

2 participants