From 4a5aed785883e024babb1b0eeae5ab1ce2066662 Mon Sep 17 00:00:00 2001 From: Ben Jeffery Date: Wed, 10 Sep 2025 00:59:38 +0100 Subject: [PATCH] Drop Python 3.9 support, update to Python 3.10-3.13 - Update pyproject.toml requires-python to >=3.10 - Remove Python 3.9 classifier from pyproject.toml - Simplify numba dependency to single version without Python constraints - Update wheel building to use Python 3.10-3.13 - Update GitHub Actions tests to use Python 3.10 and 3.13 - Update docker shared.env to exclude cp39-cp39 --- .github/workflows/docker/shared.env | 1 - .github/workflows/tests.yml | 2 +- .github/workflows/wheels.yml | 16 +++++++--------- python/CHANGELOG.rst | 2 ++ python/pyproject.toml | 6 ++---- 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docker/shared.env b/.github/workflows/docker/shared.env index e4b60f92f4..2929d0f4d2 100644 --- a/.github/workflows/docker/shared.env +++ b/.github/workflows/docker/shared.env @@ -3,5 +3,4 @@ PYTHON_VERSIONS=( cp312-cp312 cp311-cp311 cp310-cp310 - cp39-cp39 ) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 06deb15767..5939dd991c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - python: [ 3.9, 3.13 ] + python: [ "3.10", 3.13 ] os: [ macos-latest, ubuntu-24.04, windows-latest ] defaults: run: diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 94242b3f17..79508592ba 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -15,7 +15,7 @@ jobs: runs-on: macos-latest strategy: matrix: - python: [3.9, "3.10", 3.11, 3.12, 3.13] + python: ["3.10", 3.11, 3.12, 3.13] steps: - name: Checkout uses: actions/checkout@v4.2.2 @@ -45,7 +45,7 @@ jobs: runs-on: windows-latest strategy: matrix: - python: [3.9, "3.10", 3.11, 3.12, 3.13] + python: ["3.10", 3.11, 3.12, 3.13] wordsize: [64] steps: - name: Checkout @@ -85,10 +85,10 @@ jobs: - name: Checkout uses: actions/checkout@v4.2.2 - - name: Set up Python 3.9 + - name: Set up Python 3.10 uses: actions/setup-python@v5.4.0 with: - python-version: 3.9 + python-version: "3.10" - name: Build sdist shell: bash @@ -118,7 +118,7 @@ jobs: needs: ['OSX'] strategy: matrix: - python: [3.9, "3.10", 3.11, 3.12, 3.13] + python: ["3.10", 3.11, 3.12, 3.13] runner: [macos-13, macos-15] include: - runner: macos-13 @@ -155,7 +155,7 @@ jobs: runs-on: windows-latest strategy: matrix: - python: [3.9, "3.10", 3.11, 3.12, 3.13] + python: ["3.10", 3.11, 3.12, 3.13] wordsize: [64] steps: - name: Download wheels @@ -179,10 +179,8 @@ jobs: needs: ['manylinux'] strategy: matrix: - python: [3.9, "3.10", 3.11, 3.12, 3.13] + python: ["3.10", 3.11, 3.12, 3.13] include: - - python: 3.9 - wheel: cp39 - python: "3.10" wheel: cp310 - python: 3.11 diff --git a/python/CHANGELOG.rst b/python/CHANGELOG.rst index a8422cfd32..dfc6807aa9 100644 --- a/python/CHANGELOG.rst +++ b/python/CHANGELOG.rst @@ -10,6 +10,8 @@ is not the case. (:user:`benjeffery`, :issue:`2729`, :issue:`2732`, :pr:`3212`). +- Drop Python 3.9 support, require Python >= 3.10 (:pr:`3267`, :user:`benjeffery`) + **Features** diff --git a/python/pyproject.toml b/python/pyproject.toml index d564d9a7a7..daa3e4e2e5 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -15,7 +15,6 @@ classifiers = [ "Programming Language :: C", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -40,7 +39,7 @@ keywords = [ "phylogenetics", "tskit", ] -requires-python = ">=3.9" +requires-python = ">=3.10" dependencies = [ "jsonschema>=3.0.0", "numpy>=2", @@ -72,8 +71,7 @@ test = [ "msgpack==1.1.0", "msprime==1.3.4", "networkx==3.2.1", - "numba==0.61.2; python_version>='3.10'", - "numba==0.60.0; python_version=='3.9'", + "numba==0.61.2", "portion==2.6.0", "pytest==8.3.5", "pytest-cov==6.0.0",