Deprecate P;2L and P;4L in frombytes() - #9723
Open
radarhere wants to merge 2 commits into
Open
Conversation
radarhere
force-pushed
the
frombytes_pxl
branch
3 times, most recently
from
July 3, 2026 14:05
04b841f to
0f28129
Compare
radarhere
force-pushed
the
frombytes_pxl
branch
from
September 4, 2026 03:21
0f28129 to
4b2560a
Compare
Contributor
|
Hmm, these could still be useful decoders for people using Pillow to eg. carve images out of, say, game binaries? |
Member
Author
|
Could you expand further? What makes you think they are used for anything other than PCX images? |
Contributor
|
Sure. I've been involved in projects to port retro games, where Pillow has been useful to convert custom bespoke file formats to modern ones. That particular example isn't P;2L or P;4L, sure, just a palettized image with RLE encoding, but in general Pillow's decoders being available to "userland" have been useful for this sort of thing. I don't particularly see a reason why this should be deprecated in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sequel to #9725
That PR raised a ValueError if P;2L or P;4L data is truncated in
frombytes(). This PR deprecates their use as independent unpackers altogether. They can still be used when decoding PCX images.I've moved the unpackers from Unpack.c to PcxDecode.c. Once the deprecation period is up, the
unpackersandRAWMODESentries can be removed.