diff --git a/src/functions_framework/_typed_event.py b/src/functions_framework/_typed_event.py index 40e715ae..e47d8235 100644 --- a/src/functions_framework/_typed_event.py +++ b/src/functions_framework/_typed_event.py @@ -12,10 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. +import sys import inspect -from inspect import signature +from inspect import signature as _signature +if sys.version_info.major == 3 and sys.version_info.minor < 10: + signature = _signature +else: + from functools import partial + signature = partial(_signature, eval_str=True) + from functions_framework import _function_registry from functions_framework.exceptions import FunctionsFrameworkException