We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b92a9d8 commit 565e071Copy full SHA for 565e071
1 file changed
sigima_/computation/__init__.py
@@ -98,8 +98,16 @@
98
import inspect
99
import os.path as osp
100
import pkgutil
101
+import sys
102
from types import ModuleType
-from typing import Callable, Optional, ParamSpec, TypeVar
103
+from typing import Callable, Optional, TypeVar
104
+
105
+if sys.version_info >= (3, 10):
106
+ # Use ParamSpec from typing module in Python 3.10+
107
+ from typing import ParamSpec
108
+else:
109
+ # Use ParamSpec from typing_extensions module in Python < 3.10
110
+ from typing_extensions import ParamSpec
111
112
# Marker attribute used by @computation_function and introspection
113
COMPUTATION_METADATA_ATTR = "__computation_function_metadata"
0 commit comments