Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8941e0b

Browse filesBrowse files
authored
werkzeug flask upgrade (GoogleCloudPlatform#10878)
* cloud run * cloud run * appengine/flexible * appengine/standard * a few more products * fix endpoints * some more proudcts * more products * appengine standard 3 * fix appengine3 flask mail example
1 parent 514f155 commit 8941e0b
Copy full SHA for 8941e0b

File tree

Expand file treeCollapse file tree

39 files changed

+73
-66
lines changed
Filter options
Expand file treeCollapse file tree

39 files changed

+73
-66
lines changed
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
Flask==2.3.3
2-
gunicorn==20.1.0
3-
Werkzeug==2.3.7
1+
Flask==3.0.0; python_version > '3.6'
2+
Flask==2.3.3; python_version < '3.7'
3+
Werkzeug==3.0.1; python_version > '3.6'
4+
Werkzeug==2.3.7; python_version < '3.7'
5+
gunicorn==20.1.0
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
redis==4.5.4; python_version > '3.0'
22
redis<5; python_version < '3.0'
33
Flask==1.1.4; python_version < '3.0'
4-
Flask==2.1.0; python_version > '3.0'
4+
Flask==3.0.0; python_version > '3.0'
55
Werkzeug==1.0.1; python_version < '3.0'
66
Werkzeug==3.0.1; python_version > '3.0'

‎appengine/standard/migration/ndb/overview/requirements.txt

Copy file name to clipboardExpand all lines: appengine/standard/migration/ndb/overview/requirements.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ rsa==4.5; python_version < '3'
33
googleapis_common_protos
44
google-cloud-ndb
55
Flask==1.1.4; python_version < '3.0'
6-
Flask==2.1.0; python_version > '3.0'
6+
Flask==3.0.0; python_version > '3.0'
77
Werkzeug==1.0.1; python_version < '3.0'
88
Werkzeug==3.0.1; python_version > '3.0'

‎appengine/standard/migration/ndb/redis_cache/requirements.txt

Copy file name to clipboardExpand all lines: appengine/standard/migration/ndb/redis_cache/requirements.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ rsa==4.5; python_version < '3'
33
googleapis_common_protos
44
google-cloud-ndb
55
Flask==1.1.4; python_version < '3.0'
6-
Flask==2.1.0; python_version > '3.0'
6+
Flask==3.0.0; python_version > '3.0'
77
Werkzeug==1.0.1; python_version < '3.0'
88
Werkzeug==3.0.1; python_version > '3.0'
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
google-cloud-storage==1.44.0; python_version < '3.7'
22
google-cloud-storage==2.8.0; python_version > '3.6'
33
Flask==1.1.4; python_version < '3.0'
4-
Flask==2.1.0; python_version > '3.0'
4+
Flask==3.0.0; python_version > '3.0'
55
Werkzeug==1.0.1; python_version < '3.0'
66
Werkzeug==3.0.1; python_version > '3.0'

‎appengine/standard/migration/taskqueue/counter/requirements.txt

Copy file name to clipboardExpand all lines: appengine/standard/migration/taskqueue/counter/requirements.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ google-cloud-datastore==1.15.5; python_version < "3.0"
55
google-cloud-tasks==2.13.1; python_version >= "3.0"
66
google-cloud-tasks==1.5.2; python_version < "3.0"
77
Werkzeug==1.0.1; python_version < '3.0'
8-
Werkzeug==2.3.7; python_version > '3.0'
8+
Werkzeug==3.0.1; python_version > '3.0'
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Flask==1.1.4; python_version < '3.0'
2-
Flask==2.1.0; python_version > '3.0'
2+
Flask==3.0.0; python_version > '3.0'
33
Werkzeug==1.0.1; python_version < '3.0'
44
Werkzeug==3.0.1; python_version > '3.0'

‎appengine/standard/urlfetch/requests/requirements.txt

Copy file name to clipboardExpand all lines: appengine/standard/urlfetch/requests/requirements.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ Flask==3.0.0; python_version > '3.0'
33
requests==2.27.1
44
requests-toolbelt==0.10.1
55
Werkzeug==1.0.1; python_version < '3.0'
6-
Werkzeug==2.3.7; python_version > '3.0'
6+
Werkzeug==3.0.1; python_version > '3.0'
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Flask==2.0.1
1+
Flask==3.0.0
22
appengine-python-standard>=0.2.3
3-
Werkzeug==2.3.7
3+
Werkzeug==3.0.1
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Flask==2.0.1
1+
Flask==3.0.0
22
appengine-python-standard>=0.3.1
3-
Werkzeug==2.3.7
3+
Werkzeug==3.0.1

‎appengine/standard_python3/bundled-services/mail/flask/main.py

Copy file name to clipboardExpand all lines: appengine/standard_python3/bundled-services/mail/flask/main.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414

1515
import os
1616

17-
from flask import escape, Flask, request
17+
from flask import Flask, request
1818
from google.appengine.api import mail
1919
from google.appengine.api import wrap_wsgi_app
20+
from markupsafe import escape
21+
2022

2123
app = Flask(__name__)
2224

+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
Flask==2.1.2
2-
appengine-python-standard>=1.0.0
3-
Werkzeug==2.3.7
1+
Flask==3.0.0
2+
appengine-python-standard==1.1.4
3+
Werkzeug==3.0.1
4+
MarkupSafe==2.1.3
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Flask==2.2.5
1+
Flask==3.0.0
22
gunicorn==20.1.0
33
google-cloud-scheduler==2.11.2
44
Werkzeug==3.0.1
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Flask==2.1.0
1+
Flask==3.0.0
22
requests==2.31.0
3-
Werkzeug==2.3.7
3+
Werkzeug==3.0.1

‎datastore/cloud-ndb/requirements.txt

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# [START ndb_version]
22
google-cloud-ndb==2.2.1
33
# [END ndb_version]
4-
Flask==2.2.5
4+
Flask==3.0.0
55
Werkzeug==3.0.1

‎endpoints/getting-started/main.py

Copy file name to clipboardExpand all lines: endpoints/getting-started/main.py
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@
3333

3434

3535
def _base64_decode(encoded_str):
36+
# in versions of Werkzeug <3.x this function expected an encoded string that did not have the b' prefix
37+
# post Werkzeug 3.x this variable came in as a 'str' type but with the b' prefix. Removing it
38+
if encoded_str[0] == "b":
39+
encoded_str = encoded_str[1:]
3640
# Add paddings manually if necessary.
3741
num_missed_paddings = 4 - len(encoded_str) % 4
3842
if num_missed_paddings != 4:
39-
encoded_str += b"=" * num_missed_paddings
43+
encoded_str += "=" * num_missed_paddings
4044
return base64.b64decode(encoded_str).decode("utf-8")
4145

4246

@@ -51,7 +55,6 @@ def echo():
5155
def auth_info():
5256
"""Retrieves the authenication information from Google Cloud Endpoints."""
5357
encoded_info = request.headers.get("X-Endpoint-API-UserInfo", None)
54-
5558
if encoded_info:
5659
info_json = _base64_decode(encoded_info)
5760
user_info = json.loads(info_json)

‎endpoints/getting-started/main_test.py

Copy file name to clipboardExpand all lines: endpoints/getting-started/main_test.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def test_auth_info(client):
4949
]
5050

5151
encoded_info = base64.b64encode(json.dumps({"id": "123"}).encode("utf-8"))
52-
5352
for endpoint in endpoints:
5453
r = client.get(endpoint, headers={"Content-Type": "application/json"})
5554

+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Flask==2.2.5
1+
Flask==3.0.0
22
flask-cors==4.0.0
33
gunicorn==20.1.0
44
six==1.16.0
55
pyyaml==6.0
66
requests==2.31.0
77
google-auth==2.19.1
88
google-auth-oauthlib==1.0.0
9-
Werkzeug==2.3.7
9+
Werkzeug==3.0.1

‎iap/app_engine_app/requirements.txt

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Flask==2.2.5
1+
Flask==3.0.0
22
Werkzeug==3.0.1

‎iap/requirements.txt

Copy file name to clipboardExpand all lines: iap/requirements.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cryptography==41.0.4
2-
Flask==2.2.5
2+
Flask==3.0.0
33
google-auth==2.19.1
44
gunicorn==20.1.0
55
requests==2.31.0

‎memorystore/redis/requirements.txt

Copy file name to clipboardExpand all lines: memorystore/redis/requirements.txt
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313
# [START memorystore_requirements]
14-
Flask==2.1.0
14+
Flask==3.0.0
1515
gunicorn==20.1.0
1616
redis==5.0.0
17-
Werkzeug==2.3.7
17+
Werkzeug==3.0.1
1818
# [END memorystore_requirements]
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
Flask==2.1.0
1+
Flask==3.0.0
22
google-api-core==2.11.1
33
google-auth==2.19.1
44
googleapis-common-protos==1.59.1
55
prometheus-client==0.17.0
66
prometheus-flask-exporter==0.22.4
77
requests==2.31.0
8-
Werkzeug==2.3.7
8+
Werkzeug==3.0.1
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Flask==2.3.0
1+
Flask==3.0.0
22
gunicorn==20.1.0
33
tensorflow==2.12.0
4-
Werkzeug==2.3.7
4+
Werkzeug==3.0.1
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Requirements for the prediction web service.
2-
Flask==2.2.2
2+
Flask==3.0.0
33
earthengine-api==0.1.358
44
gunicorn==20.1.0
55
tensorflow==2.12.0
6-
Werkzeug==2.3.7
6+
Werkzeug==3.0.1
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Flask==2.2.3
1+
Flask==3.0.0
22
apache-beam[gcp]==2.46.0
33
google-cloud-aiplatform==1.25.0
44
gunicorn==20.1.0
55
pandas==2.0.1
66
tensorflow==2.12.0
7-
Werkzeug==2.3.7
7+
Werkzeug==3.0.1

‎people-and-planet-ai/weather-forecasting/serving/requirements.txt

Copy file name to clipboardExpand all lines: people-and-planet-ai/weather-forecasting/serving/requirements.txt
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Flask==2.2.2
1+
Flask==3.0.0
22
gunicorn==20.1.0
3-
Werkzeug==2.3.7
3+
Werkzeug==3.0.1
44

55
# Local packages.
66
./weather-data
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Flask==2.3.3
1+
Flask==3.0.0
22
gunicorn==20.1.0
33
google-cloud-profiler==4.0.0
4-
Werkzeug==2.3.7
4+
Werkzeug==3.0.1
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Flask==2.3.3
1+
Flask==3.0.0
22
google-cloud-profiler==4.0.0
3-
Werkzeug==2.3.7
3+
Werkzeug==3.0.1
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Flask==2.0.2
1+
Flask==3.0.0
22
gunicorn==20.1.0
33
google-cloud-recaptcha-enterprise==1.12.0
4-
Werkzeug==2.2.0
4+
Werkzeug==3.0.1

‎run/hello-broken/requirements.txt

Copy file name to clipboard
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Flask==2.1.0
1+
Flask==3.0.0
22
pytest==7.0.1; python_version > "3.0"
33
# pin pytest to 4.6.11 for Python2.
44
pytest==7.0.1; python_version < "3.0"
55
gunicorn==20.1.0
6-
Werkzeug==2.3.7
6+
Werkzeug==3.0.1

‎run/helloworld/requirements.txt

Copy file name to clipboard
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Flask==2.1.0
1+
Flask==3.0.0
22
gunicorn==20.1.0
3-
Werkzeug==2.3.7
3+
Werkzeug==3.0.1

‎run/image-processing/requirements.txt

Copy file name to clipboardExpand all lines: run/image-processing/requirements.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ google-cloud-storage==2.12.0
33
google-cloud-vision==3.4.5
44
gunicorn==21.2.0
55
Wand==0.6.11
6-
Werkzeug==3.0.0
6+
Werkzeug==3.0.1

‎run/logging-manual/requirements.txt

Copy file name to clipboard
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Flask==2.1.0
1+
Flask==3.0.0
22
pytest==7.0.1; python_version > "3.0"
33
# pin pytest to 4.6.11 for Python2.
44
pytest==7.0.1; python_version < "3.0"
55
gunicorn==20.1.0
6-
Werkzeug==2.3.7
6+
Werkzeug==3.0.1
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Flask==2.1.0
1+
Flask==3.0.0
22
gunicorn==20.1.0
33
google-auth==2.19.1
44
requests==2.31.0
5-
Werkzeug==2.3.7
5+
Werkzeug==3.0.1
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Flask==2.1.0
1+
Flask==3.0.0
22
gunicorn==20.1.0
33
Markdown==3.4.3
44
bleach==6.0.0
5-
Werkzeug==2.3.7
5+
Werkzeug==3.0.1

‎run/pubsub/requirements.txt

Copy file name to clipboard
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Flask==2.1.0
1+
Flask==3.0.0
22
pytest==7.0.1; python_version > "3.0"
33
# pin pytest to 4.6.11 for Python2.
44
pytest==7.0.1; python_version < "3.0"
55
gunicorn==20.1.0
6-
Werkzeug==2.3.7
6+
Werkzeug==3.0.1

‎run/service-auth/requirements.txt

Copy file name to clipboard
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
google-auth==2.19.1
22
requests==2.31.0
3-
Flask==2.1.2
3+
Flask==3.0.0
44
gunicorn==20.1.0
5-
Werkzeug==2.3.7
5+
Werkzeug==3.0.1
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
Flask==2.2.2
1+
Flask==3.0.0
22
gunicorn==20.1.0
33
opentelemetry-exporter-gcp-trace==1.5.0
44
opentelemetry-propagator-gcp==1.5.0
55
opentelemetry-instrumentation-flask==0.34b0
66
opentelemetry-instrumentation-requests==0.34b0
77
google-cloud-trace==1.11.1
8-
Werkzeug==2.3.7
8+
Werkzeug==3.0.1
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Flask==2.1.0
1+
Flask==3.0.0
22
opentelemetry-exporter-gcp-trace==1.5.0
33
opentelemetry-propagator-gcp==1.5.0
4-
Werkzeug==2.3.7
4+
Werkzeug==3.0.1

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.