Closed
Description
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.