chore(multiple samples): bump pillow to 12.2.0 and restrict to python 3.10+#14251
chore(multiple samples): bump pillow to 12.2.0 and restrict to python 3.10+#14251XrossFox wants to merge 1 commit into
Conversation
… 3.10+ - Consolidated multiple pillow entries across requirements files into a single, version-pinned entry (`pillow==12.2.0`). - Restricted execution strictly to Python 3.10 and newer (`python_version >= "3.10"`) to resolve compatibility conflicts.
There was a problem hiding this comment.
Code Review
This pull request updates the pillow dependency to version 12.2.0 (restricted to Python >= 3.10) across multiple requirements.txt files. The reviewer noted that restricting pillow to Python >= 3.10 without providing a fallback for older Python versions will cause installation and runtime issues on environments running Python 3.8 or 3.9, which are still supported by other dependencies in these files. It is recommended to add a fallback pin (such as pillow==10.4.0; python_version < "3.10") to maintain backward compatibility.
| numpy==1.26.4; python_version == '3.9' | ||
| numpy==1.24.4; python_version == '3.8' | ||
| pillow==10.4.0 | ||
| pillow==12.2.0; python_version >= "3.10" |
There was a problem hiding this comment.
By restricting pillow to python_version >= "3.10" without providing a fallback for older Python versions, environments running Python 3.8 or 3.9 (which are still supported by other dependencies in this file, such as numpy==1.24.4 and scipy==1.10.1) will fail to install pillow entirely. This will lead to ModuleNotFoundError at runtime. Please add a fallback pin for Python < 3.10.
pillow==10.4.0; python_version < "3.10"
pillow==12.2.0; python_version >= "3.10"
| pandas==2.2.3; python_version > '3.8' | ||
| pillow==10.4.0; python_version < '3.8' | ||
| pillow==10.4.0; python_version >= '3.8' | ||
| pillow==12.2.0; python_version >= "3.10" |
There was a problem hiding this comment.
Restricting pillow to >= 3.10 without a fallback will cause installation to omit pillow on Python 3.8 and 3.9, which are still supported by other dependencies in this file (e.g., pandas). Please provide a fallback version for Python < 3.10 to prevent runtime import errors.
pillow==10.4.0; python_version < "3.10"
pillow==12.2.0; python_version >= "3.10"
| google-cloud-vision==3.8.1 | ||
| pillow==10.3.0; python_version < '3.8' | ||
| pillow==10.4.0; python_version >= '3.8' | ||
| pillow==12.2.0; python_version >= "3.10" |
There was a problem hiding this comment.
pillow==12.2.0).python_version >= "3.10") to resolve compatibility conflicts.Description
Fixes b/517989048
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
nox -s py-3.9(see Test Environment Setup)nox -s lint(see Test Environment Setup)