Visitar URL original
Conditionally define ImageCms type hint to avoid requiring core by radarhere · Pull Request #8197 · python-pillow/Pillow · GitHub
Skip to content

Conditionally define ImageCms type hint to avoid requiring core - #8197

Merged
hugovk merged 3 commits into
python-pillow:mainfrom
radarhere:imagecms_core
Oct 12, 2024
Merged

hugovk merged 3 commits into
python-pillow:mainfrom
radarhere:imagecms_core

Conversation

@radarhere

Copy link
Copy Markdown
Member

Resolves #8193.

Alternative to #8196 - my thinking is that this is closer to the intention of https://peps.python.org/pep-0484/#forward-references. However, if the other PR is preferred, no problem.

@nulano

nulano commented Jul 3, 2024

Copy link
Copy Markdown
Contributor

FWIW this will also break the Docs references if Pillow is built without lcms.

@mrbean-bremen mrbean-bremen left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yeah, this looks like the cleaner approach.
Though on second thought, if it breaks the doc references, it may not be... I had missed the comment above.

@radarhere

Copy link
Copy Markdown
Member Author

If there is concern about building the docs without lcms2, I've added a commit to use nitpick_ignore to prevent failure.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot import ImageCms with no LITTLECMS2 feature installed

4 participants