Skip to content

chore(multiple samples) Updating dependencies for Wergzeug and Flask#14195

Draft
XrossFox wants to merge 3 commits into
GoogleCloudPlatform:mainfrom
XrossFox:python-werkzeug-dependency-update-1
Draft

chore(multiple samples) Updating dependencies for Wergzeug and Flask#14195
XrossFox wants to merge 3 commits into
GoogleCloudPlatform:mainfrom
XrossFox:python-werkzeug-dependency-update-1

Conversation

@XrossFox
Copy link
Copy Markdown
Contributor

@XrossFox XrossFox commented May 18, 2026

Description

This PR attempts to update all instances of Werkzeug and Flask, since they are commonly used together. With the extra addition of a few airflow samples that use both frameworks in their constraint.txt. The goal is to fix all dependabot security alerts. Failing pipelines that are not because this dependency update shall be addressed in a different, individual PR per failure.

Note: noxfile_configuration files for some of these samples where modified in #14147, so it's a good idea to merge that PR first.

fixes b/514791011

failures will be documented in b/514353082

Checklist

@product-auto-label product-auto-label Bot added samples Issues that are directly related to samples. api: appengine Issues related to the App Engine Admin API API. labels May 18, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates Flask to version 3.1.3 and Werkzeug to version 3.1.8 across numerous sample applications, generally restricting support to Python 3.9 and above. The review feedback identifies several critical issues: first, upgrading Werkzeug to 3.x while leaving Flask pinned at 2.x in several constraints and test files will cause runtime ImportErrors due to removed APIs. Second, the upgrade will break the websockets sample because Flask-Sockets is incompatible with Flask 2.0+. Finally, the changes introduce inconsistencies in migration samples by dropping support for older Python versions for Flask/Werkzeug while retaining legacy pins for other dependencies, potentially breaking the samples for users in those environments.

Comment thread appengine/flexible/websockets/requirements.txt
Comment thread composer/2022_airflow_summit/constraints.txt Outdated
Comment thread composer/blog/gcp-tech-blog/data-orchestration-with-composer/constraints.txt Outdated
Comment thread composer/cicd_sample/constraints.txt Outdated
Comment thread composer/workflows/constraints.txt Outdated
Comment thread recaptcha_enterprise/snippets/requirements-test.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: appengine Issues related to the App Engine Admin API API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant