| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| palette=Image.ADAPTIVE, colors=num_colors) | ||
| # These constants were converted to IntEnums and deprecated in | ||
| # Pillow 9.2 | ||
| dither = ( |
There was a problem hiding this comment.
I know this style is odd, but these names a very long and this code is very indented.
I also tried
dither = (
Image.Dither.NONE
if hasattr(Image, 'Dither')
else Image.NONE
)and liked that worse.
also tried doing this in-line in the function call, but that was also (subjectively) worse to my eye.
Sorry, something went wrong.
|
I have also just started seeing these temp file related failures locally (they go away on re-running). I had hoped it was because I was running too many unstable things, seeing if I can track this down... |
Sorry, something went wrong.
|
I'm also a little confused because the version of Pillow that broke thing is 9.1, but the docs say 9.2. This was a typo in the pillow docs: python-pillow/Pillow#6171 |
Sorry, something went wrong.
https://pillow.readthedocs.io/en/stable/deprecations.html#constants https://pillow.readthedocs.io/en/stable/releasenotes/9.1.0.html#constants Image.None -> Image.Dither.None Image.ADAPTIVE -> Image.Palette.ADAPTIVE
|
Why pin if the rest is going to fix it? |
Sorry, something went wrong.
because it didn't fix it, some how bumping pillow exposed a leaking temporary directory... |
Sorry, something went wrong.
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
…766-on-v3.5.x Backport PR #22766 on branch v3.5.x (FIX: account for constant deprecations in Pillow 9.1)
|
Re-reading the title of this issue. I just want to be clear this is about the deprecation of constants in Pillow, not a frequent stream of deprecations in Pillow.... |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
https://pillow.readthedocs.io/en/stable/deprecations.html#constants
Image.None -> Image.Dither.None
Image.ADAPTIVE -> Image.Palette.ADAPTIVE
PR Summary
un-break CI by not triggering warnings from Pilllow
PR Checklist
Tests and Styling
Documentation