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

Add support for Pillow 10 #84

Closed
wants to merge 1 commit into from
Closed

Add support for Pillow 10 #84

wants to merge 1 commit into from

Conversation

tjni
Copy link

@tjni tjni commented Aug 9, 2023

Image.ANTIALIAS was replaced by Image.Resampling.LANCZOS. However, the Resampling class is not available in Pillow < 9.1.0, so we need to stub it. Since we would like to support Python 2, it cannot be an IntEnum.

Note: I wasn't able to set up Python 2 on my system to test.

Resolves #75.

Image.ANTIALIAS was replaced by Image.Resampling.LANCZOS. However, the
Resampling class is not available in Pillow < 9.1.0, so we need to stub
it. Since we would like to support Python 2, it cannot be an IntEnum.
@amol-
Copy link
Owner

amol- commented Aug 9, 2023

DEPOT has been supporting PY2 for historical reasons, and mostly because it was for free. But if Python2 is a blocker to smaller or better implementation we can definitely drop support for it in 0.11. The number of PY2 installs has practically dropped to 0 since June ( https://pypistats.org/packages/filedepot )

@tjni
Copy link
Author

tjni commented Aug 9, 2023

Thank you for reviewing this!

For this implementation, there is no cost to supporting Python 2. The only difference is that upstream uses an IntEnum and we need to do with a simple class with integer constants. The only problem was I couldn't actually test my work on Python 2. I don't mind trying to support it still with this PR if CI finds something.

Updating the minimum Pillow dependency to 9.1.0 would simplify the implementation, since we would not need the compat layer anymore; that will only support Python >= 3.7, however.

@tjni
Copy link
Author

tjni commented Aug 9, 2023

pypistats.org is really cool, by the way!

@amol- amol- closed this Feb 18, 2024
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.

Deprecation warning: Image.BILINEAR (pillow >=9.1.0)
2 participants