Repository navigation
Conversation
- Upgrade `pillow` to `13.0.0` (and drop obsolete `python_version >= "3.10"`
markers) across 12 samples (`appengine/flexible/scipy`, `dataflow/*`,
`genai/*` , `people-and-planet-ai/image-classification`, `vision/snippets/*`).
- Remove unused `pillow` pins from 6 `generative_ai/*` samples (`evaluation`,
`extensions`, `model_garden`, `model_tuning`, `prompts`, `reasoning_engine`).
- Bump `apache-beam[gcp]` to `2.78.0` (lifting the `pillow<13` cap) in the 4
Beam samples, updating companion `Dockerfile` SDK tags, re-locking
`dataflow/flex-templates/pipeline_with_dependencies/requirements.txt`, and
syncing `google-cloud-storage==3.17.2` in its `requirements-test.txt`.
- Update `noxfile_config.py` in `appengine/flexible/scipy` and
`vision/snippets/*` to test Python `3.12`/`3.14`, and align
`tensorflow-landsat{,-prime}` to `3.13` to match their Dockerfiles.
- Replace deprecated `im.getdata()` with `im.get_flattened_data()` in
`vision/snippets/face_detection/faces_test.py`.
Note: Local verification uncovered unrelated pre-existing dependency/wheel
failures in several older samples; a separate follow-up task has been opened
to address them.
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates various dependencies across multiple samples, notably upgrading Pillow to version 13.0.0 and Apache Beam to version 2.78.0, along with corresponding test configuration adjustments. However, in vision/snippets/face_detection/faces_test.py, the calls to im.getdata() were incorrectly changed to im.get_flattened_data(). Since get_flattened_data() is not a valid PIL Image method, this will cause runtime AttributeErrors. It is recommended to revert these changes back to im.getdata().
| # Make sure there isn't already a green box | ||
| im = Image.open(in_file) | ||
| pixels = im.getdata() | ||
| pixels = im.get_flattened_data() |
Contributor
There was a problem hiding this comment.
| # Make sure there now is some green drawn | ||
| im = Image.open(out_file) | ||
| pixels = im.getdata() | ||
| pixels = im.get_flattened_data() |
Contributor
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.
Description
pillowto13.0.0(and drop obsoletepython_version >= "3.10"markers) across 12 samples (appengine/flexible/scipy,dataflow/*,genai/*,people-and-planet-ai/image-classification,vision/snippets/*).pillowpins from 6generative_ai/*samples (evaluation,extensions,model_garden,model_tuning,prompts,reasoning_engine).apache-beam[gcp]to2.78.0(lifting thepillow<13cap) in the 4 Beam samples, updating companionDockerfileSDK tags, re-lockingdataflow/flex-templates/pipeline_with_dependencies/requirements.txt, and syncinggoogle-cloud-storage==3.17.2in itsrequirements-test.txt.noxfile_config.pyinappengine/flexible/scipyandvision/snippets/*to test Python3.12/3.14, and aligntensorflow-landsat{,-prime}to3.13to match their Dockerfiles.im.getdata()withim.get_flattened_data()invision/snippets/face_detection/faces_test.py.Note: Local verification uncovered unrelated pre-existing dependency/wheel failures in several older samples; a separate follow-up task has been opened to address them.
Fixes b/590880484
Checklist
Testing
Compliance & Style
Post-Approval Actions