Functions defined with @functions_framework.http
or @functions_framework.typed
do not support type hints
#361
Labels
@functions_framework.http
or @functions_framework.typed
do not support type hints
#361
Uh oh!
There was an error while loading. Please reload this page.
Simply put, defining a function with the
@functions_framework.http
decorator does not support type hints. With some digging, I stumbled upon the possibility of using@functions_framework.typed
, but even this does not work, nor is it documented anywhere. Please see:This is taken from my attempts to create and deploy a function running python version
3.12.x
. There are no error messages indicating that the cause is the type hints, only that the function failed to be ready and accepting of traffic.I would suggest the following:
As for an example, even the most basic functions such as the following will break:
The text was updated successfully, but these errors were encountered: