Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with Flask <2.0 due to flask.typing import #345

Open
apgiorgi opened this issue Sep 20, 2024 · 0 comments
Open

Incompatibility with Flask <2.0 due to flask.typing import #345

apgiorgi opened this issue Sep 20, 2024 · 0 comments
Assignees

Comments

@apgiorgi
Copy link

The functions-framework package (as of version 3.5.0) is using flask.typing, which was introduced in Flask 2.0.0. However, the setup.py file allows Flask versions from 1.0 to 4.0. This causes runtime errors when using functions-framework with Flask versions before 2.0.0.

Error Message

CopyTraceback (most recent call last):
File "/layers/google.python.pip/pip/bin/functions-framework", line 5, in <module>
    from functions_framework._cli import *cli
File "/layers/google.python.pip/pip/lib/python3.7/site-packages/functions_framework/__init__.py", line 57, in <module>
    HTTPFunction = Callable[[flask.Request], flask.typing.ResponseReturnValue]
AttributeError: module 'flask' has no attribute 'typing'

Proposed Solution

Requirements should be updated to Flask 2.0.0 or later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants