Skip to content

Commit

Permalink
[python] Drop support for Python 3.7 (#2181) (#2184)
Browse files Browse the repository at this point in the history
Co-authored-by: John Kerl <[email protected]>
  • Loading branch information
github-actions[bot] and johnkerl authored Mar 1, 2024
1 parent ae9eb9f commit 71cb213
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-ci-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
# os: [ubuntu-22.04, macos-12, windows-2019]
# TODO: add 3.12
# https://github.com/single-cell-data/TileDB-SOMA/issues/1849
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']
include:
- runs-on: ubuntu-22.04
cc: gcc-11
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-ci-minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-22.04, macos-12]
python-version: ['3.7', '3.11']
python-version: ['3.8', '3.11']
include:
- os: ubuntu-22.04
cc: gcc-11
Expand Down
13 changes: 2 additions & 11 deletions apis/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ def run(self):
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down Expand Up @@ -316,18 +315,10 @@ def run(self):
zip_safe=False,
setup_requires=["pybind11"],
install_requires=[
# Needed for Python 3.7 which anndata 0.9 doesn't support but we do
"anndata < 0.9; python_version<'3.8'",
# Tracked in https://github.com/single-cell-data/TileDB-SOMA/issues/1785
"anndata != 0.10.0; python_version>='3.8'",
"attrs>=22.2",
"numba>=0.58.0; python_version>='3.8'",
# Older numba version needed for Python3.7.
# This older numba version was also incompatible with newer numpy
# versions, and the old pip solver (<=2020) needed us to explicate
# that constraint here (issue #1051).
"numba==0.56.4; python_version<'3.8'",
"numpy>=1.18,<1.24; python_version<'3.8'",
"numba>=0.58.0",
"pandas",
# TODO: once we no longer support Python 3.7, remove this and pin to pyarrow >= 14.0.1
# https://github.com/single-cell-data/TileDB-SOMA/issues/1926
Expand All @@ -350,7 +341,7 @@ def run(self):
"typeguard<3.0",
]
},
python_requires=">=3.7",
python_requires=">=3.8",
cmdclass={"build_ext": build_ext, "bdist_wheel": bdist_wheel},
version=version.getVersion(),
)
14 changes: 2 additions & 12 deletions apis/python/tests/test_soma_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,7 @@ def test_soma_array_var_x_data():

# iterate read batches until all results have been processed
total_num_rows = 0
# The := "walrus" operator is really the appropriate thing here, but alas, is not
# supported in Python 3.7 which we do wish to preserve compatibility with.
# while arrow_table := sr.read_next():
while not sr.results_complete():
arrow_table = sr.read_next()
while arrow_table := sr.read_next():
total_num_rows += arrow_table.num_rows

assert total_num_rows == 4848644
Expand Down Expand Up @@ -219,13 +215,7 @@ def test_soma_array_obs_slice_x():

# iterate read batches until all results have been processed
total_num_rows = 0
# The := "walrus" operator is really the appropriate thing here, but alas, is not
# supported in Python 3.7 which we do wish to preserve compatibility with.
# while x_data := sr.read_next():
while True:
x_data = sr.read_next()
if not x_data:
break
while x_data := sr.read_next():
total_num_rows += x_data.num_rows

assert total_num_rows == 110280
Expand Down

0 comments on commit 71cb213

Please sign in to comment.