Allow Pillow 11 and 12 (relax pillow<11 to pillow<13)#519
Open
gkriegspeedbay wants to merge 1 commit into
Open
Allow Pillow 11 and 12 (relax pillow<11 to pillow<13)#519gkriegspeedbay wants to merge 1 commit into
gkriegspeedbay wants to merge 1 commit into
Conversation
The `pillow<11` ceiling is precautionary, not code-driven: surya already uses the modern Pillow API throughout (Image.Resampling.LANCZOS/BILINEAR, resize/thumbnail, ImageDraw, ImageFont.truetype, ImageOps) and none of the APIs removed in Pillow 10/11 (Image.ANTIALIAS, ImageDraw.textsize, ImageFont.getsize, etc.). Widening to <13 admits Pillow 11 and 12. This also unblocks downstream consumers (e.g. marker-pdf) whose own CVE remediation is gated by surya-ocr's transitive `pillow<11` pin. See datalab-to#464. Verified: full test suite passes with Pillow 12.2.0 on both transformers 4.57.6 and 5.12.0 (detection, layout, recognition, table_rec, ocr_error).
Contributor
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Author
|
Heads-up for whoever reviews: this pairs with #520 (transformers 5.x / huggingface-hub 1.x). The two relaxations are complementary — #519 alone still leaves |
This was referenced Jun 13, 2026
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.
What
Relax the Pillow upper bound:
pillow>=10.2.0,<11→pillow>=10.2.0,<13(admits Pillow 11 and 12).Why
The
<11ceiling looks precautionary rather than code-driven. surya already uses the modern Pillow API throughout —Image.Resampling.LANCZOS/BILINEAR,resize/thumbnail,ImageDraw,ImageFont.truetype,ImageOps— and none of the APIs removed in Pillow 10/11 (Image.ANTIALIAS,ImageDraw.textsize,ImageFont.getsize, …). A tree-wide grep for the removed/changed-in-11 symbols found no uses.This also unblocks downstream consumers (e.g. marker-pdf) whose security updates are gated by surya-ocr's transitive
pillow<11pin. Refs #464.Testing
Full test suite passes with Pillow 12.2.0 on both transformers 4.57.6 and 5.12.0 (Python 3.11, CPU):
test_detection,test_layout,test_recognition,test_table_rec,test_ocr_errors.🤖 Generated with Claude Code