#339·Kats

Python 3.9 code mixed with Python 3.10 code while Python 3.10 is not supported

Author: AnyCPUCreated Mar 5, 2025Updated Mar 5, 2025

This commit https://github.com/facebookresearch/Kats/commit/40aab6d2344af7fa195472e124f61bc1d6f6db32 introduces Python 3.10 code in codebase mainly based on Python 3.9.

At the moment the Kats package can be installed only for Python 3.9 and in minimal mode MINIMAL_KATS=1.

Diff sample:

diff
+from kats.compat.pandas import assert_frame_equal, assert_series_equal
+
FigSize = Tuple[int, int]
-INTERPOLATION_METHOD_TYPE = (
-    Literal["higher"]
-    | Literal["linear"]
-    | Literal["lower"]
-    | Literal["midpoint"]
-    | Literal["nearest"]
-)
+INTERPOLATION_METHOD_TYPE = Union[
+    Literal["higher"],
+    Literal["linear"],
+    Literal["lower"],
+    Literal["midpoint"],
+    Literal["nearest"],
+]