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

Remove WebP support without anim, mux/demux, and with buggy alpha #8213

Merged
merged 15 commits into from
Aug 14, 2024

Conversation

homm
Copy link
Member

@homm homm commented Jul 7, 2024

Rationale

There is a bunch of legacy code which is not even tested:
https://app.codecov.io/gh/python-pillow/Pillow/pull/8211/blob/src/PIL/WebPImagePlugin.py#L50
All Pillow capabilities require libwebp 0.5.0, which was released in Dec 2015.

Removed APIs

  • features.check("transp_webp"): Deprecated, will be removed in 12
  • features.check("webp_mux"): Deprecated, will be removed in 12
  • features.check("webp_anim"): Deprecated, will be removed in 12
  • _webp.WebPDecoderVersion(): not documented and has alternative: _webp.webpdecoder_version
  • _webp.WebPDecoderBuggyAlpha(): not documented
  • _webp.HAVE_WEBPANIM: not documented
  • _webp.WebPDecode(): obsolete webp decoder
  • webpmux compiling options

src/_webp.c Show resolved Hide resolved
@@ -201,7 +201,7 @@ def cmd_msbuild(
},
"build": [
*cmds_cmake(
"webp webpdemux webpmux",
"webp webpmux webpdemux",
Copy link
Member Author

Choose a reason for hiding this comment

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

Preserve order like in other places

@@ -15,10 +13,8 @@
* very early versions had some significant differences, so we require later
* versions, before enabling animation support.
*/
#if WEBP_MUX_ABI_VERSION >= 0x0104 && WEBP_DEMUX_ABI_VERSION >= 0x0105
Copy link
Member Author

@homm homm Jul 7, 2024

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

IIRC, some of that was for webp as shipped in debian derived distributions, now long deprecated.

@radarhere radarhere added the WebP label Jul 8, 2024
@radarhere
Copy link
Member

features.check("transp_webp")
features.check("webp_mux")
features.check("webp_anim")

Removing these without warning sounds a little concerning to me - using them doesn't mean someone is using software from 9 years ago, merely that they are supporting the idea of other people doing so.

@radarhere radarhere changed the title Remove webp support without anim, mux/demux, and with buggy alpha Remove WebP support without anim, mux/demux, and with buggy alpha Jul 8, 2024
@homm homm force-pushed the webp-require-anim branch from 924b4fe to 709f103 Compare July 8, 2024 16:10
@homm
Copy link
Member Author

homm commented Jul 8, 2024

@radarhere pretty reasonable. I've moved them back.

Tests/test_file_webp_animated.py Outdated Show resolved Hide resolved
Tests/test_file_webp_metadata.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
src/_webp.c Show resolved Hide resolved
@homm homm requested a review from nulano July 16, 2024 11:01
@homm
Copy link
Member Author

homm commented Jul 28, 2024

Rebased

src/PIL/features.py Outdated Show resolved Hide resolved
src/_webp.c Outdated Show resolved Hide resolved
@homm homm force-pushed the webp-require-anim branch from 41c1047 to 924df9e Compare August 13, 2024 05:35
@homm
Copy link
Member Author

homm commented Aug 13, 2024

Rebased and squashed some commits

@homm
Copy link
Member Author

homm commented Aug 13, 2024

@radarhere could you look at this? I'm not experienced with mypy at all
https://github.com/python-pillow/Pillow/actions/runs/10364204279/job/28689074326?pr=8213

src/PIL/features.py Outdated Show resolved Hide resolved
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
@radarhere radarhere added the Deprecation Feature that will be removed in the future label Aug 13, 2024
@homm homm merged commit 35a70e4 into python-pillow:main Aug 14, 2024
73 checks passed
@homm homm deleted the webp-require-anim branch August 14, 2024 11:27
radarhere added a commit to radarhere/Pillow that referenced this pull request Sep 10, 2024
radarhere added a commit to radarhere/Pillow that referenced this pull request Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecation Feature that will be removed in the future WebP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants