Skip to content

Commit

Permalink
drop Python 3.8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-williams committed Sep 23, 2024
1 parent 9cb6f80 commit 54d961a
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 71 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/python-somacore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ jobs:
format-check:
runs-on: ubuntu-latest
env:
PYTHON_VERSION: "3.8"
PYTHON_VERSION: "3.9"
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: pip
cache-dependency-path: python-spec/requirements-py${{ env.PYTHON_VERSION }}-lint.txt
cache-dependency-path: "python-spec/requirements-py${{ env.PYTHON_VERSION }}*.txt"

- name: Install static analysis packages
run: |
pip install -r python-spec/requirements-py${{ env.PYTHON_VERSION }}-lint.txt
working-directory: python-spec
run: pip install -r requirements-py${PYTHON_VERSION}.txt -r requirements-py${PYTHON_VERSION}-lint.txt

- name: Restore pre-commit cache
uses: actions/cache@v3
Expand All @@ -45,7 +45,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies = [
"scipy",
"typing-extensions>=4.1", # For LiteralString (py3.11)
]
requires-python = "~=3.8"
requires-python = ">=3.9"
urls = { repository = "https://github.com/single-cell-data/SOMA.git" }
classifiers = ["License :: OSI Approved :: MIT License"]

Expand All @@ -43,7 +43,7 @@ tag_regex = '^python-(?P<version>[vV]?\d+(?:\.\d+){0,2}[^\+]*)(?:\+.*)?$'

[tool.ruff]
lint.extend-select = ["I"]
target-version = "py38"
target-version = "py39"

[tool.ruff.lint.isort]
force-single-line = true
Expand All @@ -54,7 +54,7 @@ single-line-exclusions = ["typing", "typing_extensions"]
check_untyped_defs = true
enable_error_code = ["ignore-without-code"]
warn_redundant_casts = true
python_version = 3.8
python_version = 3.9
# We want to enable this but it won't work when running locally due to the
# presence of _version.py (which invalidates the ignore, which causes an error).
#
Expand Down
38 changes: 0 additions & 38 deletions python-spec/requirements-py3.8-lint.txt

This file was deleted.

19 changes: 0 additions & 19 deletions python-spec/requirements-py3.8.txt

This file was deleted.

3 changes: 3 additions & 0 deletions python-spec/requirements-py3.9-lint.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mypy==1.11.2
pandas-stubs==2.2.2.240807 # last version which supports Python 3.9
pre-commit==3.8.0
6 changes: 2 additions & 4 deletions python-spec/src/somacore/coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ class Axis:


@attrs.define(frozen=True)
class CoordinateSpace(
collections.abc.Sequence
): # Change to Sequence[Axis] after 3.8 is dropped.
class CoordinateSpace(collections.abc.Sequence):
"""A coordinate space for spatial data.
Args:
Expand All @@ -37,7 +35,7 @@ class CoordinateSpace(
Lifecycle: experimental
"""

axes: Tuple[Axis, ...] = attrs.field(converter=tuple)
axes: Sequence[Axis] = attrs.field(converter=tuple)

@axes.validator
def _validate(self, _, axes: Tuple[Axis, ...]) -> None:
Expand Down
4 changes: 2 additions & 2 deletions python-spec/update-requirements-txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ TEMPDIR="$(mktemp -d)"
trap "trash $TEMPDIR" EXIT

# The version of Python we want to run lints under.
LINTVER=3.8
LINTVER=3.9

for PYVER in 3.8 3.9 3.10 3.11 3.12; do
for PYVER in 3.9 3.10 3.11 3.12; do
CONDIR="$TEMPDIR/py-$PYVER"
conda create -y -p "$CONDIR" "python=$PYVER"
(
Expand Down

0 comments on commit 54d961a

Please sign in to comment.