Skip to content

Commit 90daf28

Browse files
authored
Support Python 3.9 for PyIceberg (#637)
1 parent 7797f44 commit 90daf28

File tree

85 files changed

+1160
-3275
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1160
-3275
lines changed

.github/workflows/build_wheels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
strategy:
117117
fail-fast: false
118118
matrix:
119-
python_version: ["3.10", "3.11", "3.12", "3.13"]
119+
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
120120
needs: build_bodosql_wheels
121121
steps:
122122
- name: Setup Python
@@ -173,7 +173,7 @@ jobs:
173173
needs: build-iceberg
174174
strategy:
175175
matrix:
176-
python_version: ["3.10", "3.11", "3.12", "3.13"]
176+
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
177177
os: [ubuntu-latest] #, macos-13, macos-14]
178178
# Test all combinations to completion
179179
fail-fast: false

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
# Don't cancel other jobs if one fails
2222
fail-fast: false
2323
matrix:
24-
python-version: ['3.13', '3.12', '3.11', '3.10']
24+
python-version: ['3.13', '3.12', '3.11', '3.10', '3.9']
2525
uses: ./.github/workflows/_build_bodo_conda_linux_comm.yml
2626
with:
2727
python-version: ${{ matrix.python-version }}
@@ -36,7 +36,7 @@ jobs:
3636
fail-fast: false
3737
matrix:
3838
# On pull requests, only test building for 3.13
39-
python-version: ${{ fromJson(github.event_name == 'pull_request' && '["3.13"]' || '["3.13", "3.12", "3.11", "3.10"]') }}
39+
python-version: ${{ fromJson(github.event_name == 'pull_request' && '["3.13"]' || '["3.13", "3.12", "3.11", "3.10", "3.9"]') }}
4040
uses: ./.github/workflows/_build_bodo_conda_linux_comm.yml
4141
with:
4242
python-version: ${{ matrix.python-version }}
@@ -49,7 +49,7 @@ jobs:
4949
fail-fast: false
5050
matrix:
5151
# On pull requests, only test building for 3.13
52-
python-version: ${{ fromJson(github.event_name == 'pull_request' && '["3.13"]' || '["3.13", "3.12", "3.11", "3.10"]') }}
52+
python-version: ${{ fromJson(github.event_name == 'pull_request' && '["3.13"]' || '["3.13", "3.12", "3.11", "3.10", "3.9"]') }}
5353
os: ['macos-13', 'macos-14', 'windows-latest']
5454
uses: ./.github/workflows/_build_bodo_conda_native.yml
5555
with:

BodoSQL/bodosql/bodosql_types/rest_catalog.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
catalog contains all information needed to connect and use REST Iceberg catalog for organizing and modifying tables.
33
"""
44

5+
from __future__ import annotations
6+
57
import os
68

79
import numba

BodoSQL/bodosql/bodosql_types/snowflake_catalog.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
in Java and load relevant schema information.
44
"""
55

6+
from __future__ import annotations
7+
68
from copy import deepcopy
79

810
from numba.core import types
@@ -162,7 +164,7 @@ def __init__(
162164
self.iceberg_volume = iceberg_volume
163165

164166
@classmethod
165-
def from_conn_str(cls, conn_str: str) -> "SnowflakeCatalog":
167+
def from_conn_str(cls, conn_str: str) -> SnowflakeCatalog:
166168
conn_contents = parse_conn_str(conn_str, strict_parsing=True)
167169
ref_str = "See https://docs.snowflake.com/developer-guide/python-connector/sqlalchemy#connection-parameters for constructing a connection URL."
168170

BodoSQL/bodosql/kernels/json_array_kernels.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
Implements BodoSQL array kernels related to JSON utilities
33
"""
44

5+
from __future__ import annotations
6+
57
import numba
68
from numba.core import types
79
from numba.extending import overload, register_jitable

BodoSQL/bodosql/remove_pure_calls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
"""
24
File used to handle the logic for BodoSQL specific calls in the BodoSQL package.
35
"""

BodoSQL/bodosql/tests/test_kernels/test_datetime_array_kernels.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3155,13 +3155,12 @@ def datetime_constructor(h, m, s, ms, us, ns):
31553155
return np.datetime64(ts)
31563156

31573157
time_value_constructor = time_constructor
3158-
match timetype:
3159-
case "time":
3160-
time_value_constructor = time_constructor
3161-
case "timestamp":
3162-
time_value_constructor = timestamp_constructor
3163-
case "datetime":
3164-
time_value_constructor = datetime_constructor
3158+
if timetype == "time":
3159+
time_value_constructor = time_constructor
3160+
elif timetype == "timestamp":
3161+
time_value_constructor = timestamp_constructor
3162+
elif timetype == "datetime":
3163+
time_value_constructor = datetime_constructor
31653164

31663165
def impl(date, time):
31673166
return pd.Series(bodosql.kernels.timestamp_from_date_and_time(date, time))

BodoSQL/bodosql/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
"""
24
BodoSQL utils used to help construct Python code.
35
"""

BodoSQL/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "bodosql"
77
dynamic = ["version"]
88
description = "Bodo's Vectorized SQL execution engine for clusters"
99
readme = "README_pypi.md"
10-
requires-python = ">=3.10,<3.14"
10+
requires-python = ">=3.9,<3.14"
1111
keywords = ["data", "analytics", "cluster"]
1212
authors = [{ name = "Bodo.ai" }]
1313

@@ -17,6 +17,7 @@ classifiers = [
1717
"Operating System :: POSIX :: Linux",
1818
"Operating System :: MacOS :: MacOS X",
1919
"Programming Language :: Python",
20+
"Programming Language :: Python :: 3.9",
2021
"Programming Language :: Python :: 3.10",
2122
"Programming Language :: Python :: 3.11",
2223
"Programming Language :: Python :: 3.12",

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ See Bodo documentation to learn more: https://docs.bodo.ai/
6363

6464
## Installation
6565

66-
Note: Bodo requires Python 3.10, 3.11, 3.12, or 3.13.
66+
Note: Bodo requires Python 3.9+.
6767

6868
Bodo can be installed using Pip or Conda:
6969

0 commit comments

Comments
 (0)