Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0b87159

Browse files
dandhleeengelke
andauthored
fix: remove vulnerable Pillow versions (GoogleCloudPlatform#7367)
* chore(deps): remove python2 and 3.6 pin for appengine/flex/scipy * chore(deps): remove python3.6 and below pin for dataflow/tensorflow-landsat * fix: remove python3.6 for ppai/image-classification * test: skip python2 and 3.6 tests * chore: fix license year Co-authored-by: Charles Engelke <[email protected]>
1 parent 9b1a539 commit 0b87159

File tree

5 files changed

+44
-11
lines changed

5 files changed

+44
-11
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Default TEST_CONFIG_OVERRIDE for python repos.
16+
17+
# You can copy this file into your directory, then it will be imported from
18+
# the noxfile.py.
19+
20+
# The source of truth:
21+
# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/noxfile_config.py
22+
23+
TEST_CONFIG_OVERRIDE = {
24+
# You can opt out from the test for specific Python versions.
25+
"ignored_versions": ["2.7", "3.6"],
26+
# Old samples are opted out of enforcing Python type hints
27+
# All new samples should feature them
28+
"enforce_type_hints": False,
29+
# An envvar key for determining the project id to use. Change it
30+
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
31+
# build specific Cloud project. You can also use your own string
32+
# to use your own Cloud project.
33+
"gcloud_project_env": "GOOGLE_CLOUD_PROJECT",
34+
# 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT',
35+
# A dictionary you want to inject into your test. Don't put any
36+
# secrets here. These values will override predefined values.
37+
"envs": {},
38+
}
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
Flask==2.0.2
22
gunicorn==20.1.0
33
imageio==2.13.5
4-
numpy==1.21.4; python_version >= '3.7'
5-
numpy==1.19.5; python_version < '3.7'
6-
pillow==9.0.0; python_version > '3.6'
7-
pillow==8.4.0; python_version <='3.6'
8-
scipy==1.7.3; python_version >= '3.7'
9-
scipy==1.5.4; python_version < '3.7'
4+
numpy==1.21.4
5+
pillow==9.0.0
6+
scipy==1.7.3
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
pillow==9.0.0; python_version > '3.6'
2-
pillow==8.4.0; python_version <='3.6'
1+
pillow==9.0.0
32
apache-beam[gcp]==2.31.0
43
rasterio==1.2.10
54
tensorflow==2.7.0

people-and-planet-ai/image-classification/noxfile_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
TEST_CONFIG_OVERRIDE = {
2424
# You can opt out from the test for specific Python versions.
2525
# NOTE: Apache Beam does not currently support Python 3.9 or 3.10.
26-
"ignored_versions": ["2.7", "3.9", "3.10"],
26+
"ignored_versions": ["2.7", "3.6", "3.9", "3.10"],
2727
# Old samples are opted out of enforcing Python type hints
2828
# All new samples should feature them
2929
"enforce_type_hints": True,
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
pillow==9.0.0; python_version > '3.6'
2-
pillow==8.4.0; python_version <='3.6'
1+
pillow==9.0.0
32
apache-beam[gcp]==2.33.0
43
google-cloud-aiplatform==1.9.0
54
google-cloud-bigquery==2.32.0 # Indirect dependency, but there is a version conflict that causes pip to hang unless we constraint this.

0 commit comments

Comments
 (0)