Skip to content

Commit 5c8dbcd

Browse files
committed
fix: Update type alias import to use typing_extensions for compatibility
1 parent c191be7 commit 5c8dbcd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/datafusion/udf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
from datafusion.expr import Expr
3131

3232
if TYPE_CHECKING:
33-
from typing import TypeAlias
33+
# for python 3.10 and above, we can use
34+
# from typing import TypeAlias
35+
# but for python 3.9, we use the following
36+
from typing_extensions import TypeAlias
3437

3538
_R: TypeAlias = pa.DataType
3639

0 commit comments

Comments
 (0)