Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/cloud-run-python-hello-world/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Flask==2.3.3
Flask==3.1.3
requests==2.31.0
debugpy # Required for debugging.
2 changes: 1 addition & 1 deletion python/python-guestbook/src/backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Flask==2.3.3
Flask==3.1.3

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Upgrading Flask to 3.1.3 in this module will break the backend application because Flask-PyMongo==2.3.0 is incompatible with Flask 3.x. Flask 3.0 completely removed the deprecated flask._app_ctx_stack and flask._request_ctx_stack globals. Flask-PyMongo (which has not been updated since 2020) relies on _app_ctx_stack to manage its database connections. As a result, importing Flask-PyMongo under Flask 3.x will raise an ImportError: cannot import name '_app_ctx_stack' from 'flask' on startup. To fix this, you can pin Flask to <3.0 for this specific backend service to maintain compatibility with Flask-PyMongo, or migrate away from Flask-PyMongo to direct pymongo usage.

Flask==2.3.3

Flask-PyMongo==2.3.0
bleach==5.0.1
debugpy # Required for debugging
2 changes: 1 addition & 1 deletion python/python-guestbook/src/frontend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Flask==2.3.3
Flask==3.1.3
requests==2.31.0
python-dateutil==2.8.2
debugpy # Required for debugging
2 changes: 1 addition & 1 deletion python/python-hello-world/src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Flask==2.3.3
Flask==3.1.3
debugpy # Required for debugging