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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

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 Outdated 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.

homm added 2 commits July 7, 2024 23:08
# Conflicts:
#	src/PIL/WebPImagePlugin.py
@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
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 Outdated Show resolved Hide resolved
@homm homm requested a review from nulano July 16, 2024 11:01
# Conflicts:
#	docs/releasenotes/11.0.0.rst
#	src/_webp.c
@homm homm removed the Needs Rebase label Jul 28, 2024
@homm
Copy link
Member Author

homm commented Jul 28, 2024

Rebased

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants