File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 20
20
from __future__ import annotations
21
21
22
22
import warnings
23
- from typing import TYPE_CHECKING , Any , Protocol
23
+ from typing import TYPE_CHECKING , Any , Protocol , Union
24
24
25
25
try :
26
26
from warnings import deprecated # Python 3.13+
@@ -83,7 +83,10 @@ def __datafusion_table_provider__(self) -> object: ... # noqa: D105
83
83
84
84
85
85
# Type alias for objects accepted by read_table
86
- TableLike = Table | TableProviderExportable
86
+ # Use typing.Union here (instead of PEP 604 `|`) because this alias is
87
+ # evaluated at import time and must work on Python 3.9 where PEP 604
88
+ # syntax is not supported for runtime expressions.
89
+ TableLike = Union [Table , TableProviderExportable ]
87
90
88
91
89
92
class CatalogProviderExportable (Protocol ):
You can’t perform that action at this time.
0 commit comments