Skip to content

fix: pin pillow to exclude broken 12.3.0 release - #1646

Closed
AngeloDanducci wants to merge 1 commit into
generative-computing:mainfrom
AngeloDanducci:ad-1640
Closed

AngeloDanducci wants to merge 1 commit into
generative-computing:mainfrom
AngeloDanducci:ad-1640

Conversation

@AngeloDanducci

Copy link
Copy Markdown
Contributor

Pull Request

Issue

Fixes #1640

Description

Skips pillow 12.3.0 due to removal of ink as required for RichDocument handling.

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code was added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

Attribution

  • AI coding assistants used

Adding a new component, requirement, sampling strategy, or tool?

If your PR adds or modifies one of the types below, check the matching box. A checklist of type-specific review items will be posted as a comment.

  • Component
  • Requirement
  • Sampling Strategy
  • Tool

NOTE: Please ensure you have an issue that has been acknowledged by a core contributor and routed you to open a pull request against this repository. Otherwise, please open an issue before continuing with this pull request.

Signed-off-by: AngeloDanducci <angelo.danducci.ii@ibm.com>
@AngeloDanducci
AngeloDanducci requested a review from a team as a code owner September 10, 2026 18:38
@github-actions github-actions Bot added the bug Something isn't working label Sep 10, 2026
@planetf1

Copy link
Copy Markdown
Contributor

I couldn't reproduce the premise of this PR locally.

Setup: clean venv, uv sync --extra docling, forced pillow==12.3.0 (current PyPI release, not yanked), no bytecode cache.

Result: _Ink is present in PIL._typing, ImageDraw imports ImageText fine, and from mellea.stdlib.components.docs.richdocument import RichDocument succeeds. I can't reproduce the ImportError from #1640 against a normal install of 12.3.0.

The reporter's traceback path (/usr/local/lib/python3.13/dist-packages/PIL/_typing.py) is Debian-style dist-packages — consistent with Google Colab's preinstalled system packages, which the reporter was also hitting other issues in that same session (generative-computing/mellea-tutorials#5). Colab base images can end up with a partially-upgraded pillow after pip install (not every file replaces atomically), producing exactly this "new ImageDraw.py against stale _typing.py" mismatch — an environment problem, not a defect in the wheel.

If so, pinning pillow repo-wide is the wrong fix: it excludes a good release for everyone, and won't reliably fix Colab either. A forced reinstall (pip install --force-reinstall --no-deps pillow) in the notebook's setup cell would address the actual failure mode regardless of version.

Could you confirm this reproduces in a plain uv/venv install of 12.3.0, outside Colab? If it's Colab-only, I'd downgrade this to WARNING and fix the notebook instead — happy to help. Separately: the floor bump to >=12.2.0 isn't explained by the bug and isn't covered by the new test, which only checks the specifier string, not the actual import.

@AngeloDanducci

Copy link
Copy Markdown
Contributor Author

Testing in Colab and not local, had assumed the problem carried over good catch Nigel. Closing this in favor of looking to address this via Colab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pin pillow to a version that includes '_Ink' in 'PIL._typing'

2 participants