Skip to content

Commit c223d21

Browse files
authored
Remove support for Python 3.8 (#1290)
* Remove support for Python 3.8 (EOL) * Add release note * Update black to support newer Python syntaxes * Update mypy as well * More fixes * Bump ruff as well * Fix lint finds
1 parent 327b089 commit c223d21

21 files changed

Lines changed: 65 additions & 52 deletions

.github/workflows/docs_dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up Python
1919
uses: actions/setup-python@v5
2020
with:
21-
python-version: '3.8'
21+
python-version: '3.10'
2222
- name: Install dependencies
2323
run: |
2424
python -m pip install --upgrade pip

.github/workflows/docs_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Python
2020
uses: actions/setup-python@v5
2121
with:
22-
python-version: '3.8'
22+
python-version: '3.10'
2323
- name: Install dependencies
2424
run: |
2525
python -m pip install --upgrade pip

.github/workflows/main.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
- uses: actions/checkout@v4
2626
- uses: actions/setup-python@v5
2727
with:
28-
python-version: 3.8
29-
- run: pip install -U ruff==0.4.1 black~=22.0
28+
python-version: "3.10"
29+
- run: pip install -U ruff==0.6.8 black~=24.8
3030
- uses: dtolnay/rust-toolchain@stable
3131
with:
3232
components: rustfmt
@@ -58,7 +58,7 @@ jobs:
5858
strategy:
5959
matrix:
6060
rust: [stable]
61-
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
61+
python-version: [3.9, "3.10", "3.11", "3.12"]
6262
platform: [
6363
{ os: "macOS-13", python-architecture: "x64", rust-target: "x86_64-apple-darwin" },
6464
{ os: "macOS-14", python-architecture: "arm64", rust-target: "aarch64-apple-darwin" },
@@ -68,18 +68,16 @@ jobs:
6868
include:
6969
# Test minimal supported Rust version
7070
- rust: 1.70.0
71-
python-version: 3.8
71+
python-version: "3.10"
7272
platform: { os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" }
7373
msrv: "MSRV"
7474
# Test future versions of Rust and Python
7575
- rust: beta
7676
python-version: "3.13-dev"
7777
platform: { os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" }
7878
msrv: "Beta"
79-
# Exclude python 3.8 and 3.9 on arm64 until actions/setup-python#808 is resolved
79+
# Exclude python 3.9 on arm64 until actions/setup-python#808 is resolved
8080
exclude:
81-
- platform: {os: "macOS-14", python-architecture: "arm64", rust-target: "aarch64-apple-darwin" }
82-
python-version: 3.8
8381
- platform: {os: "macOS-14", python-architecture: "arm64", rust-target: "aarch64-apple-darwin" }
8482
python-version: 3.9
8583
steps:
@@ -109,7 +107,7 @@ jobs:
109107
runs-on: ubuntu-latest
110108
strategy:
111109
matrix:
112-
python-version: [3.8, 3.9, "3.10", "3.11"]
110+
python-version: [3.9, "3.10", "3.11", "3.12"]
113111
steps:
114112
- uses: actions/checkout@v4
115113
- name: Set up Python ${{ matrix.python-version }}
@@ -179,7 +177,7 @@ jobs:
179177
- name: Set up Python ${{ matrix.python-version }}
180178
uses: actions/setup-python@v5
181179
with:
182-
python-version: 3.8
180+
python-version: "3.10"
183181
- name: Install Rust toolchain
184182
uses: dtolnay/rust-toolchain@stable
185183
- name: Install binary deps

.github/workflows/wheels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ jobs:
149149
python -m cibuildwheel --output-dir wheelhouse
150150
env:
151151
CIBW_ARCHS_LINUX: aarch64
152-
CIBW_SKIP: cp36-* cp37-* *many*
153-
CIBW_TEST_SKIP: cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* *many*
152+
CIBW_SKIP: cp36-* cp37-* cp38-* *many*
153+
CIBW_TEST_SKIP: cp39-* cp310-* cp311-* cp312-* *many*
154154
- uses: actions/upload-artifact@v4
155155
with:
156156
path: ./wheelhouse/*.whl

.mergify.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
queue_rules:
22
- name: automerge
33
conditions:
4-
- check-success=python3.8-x64 windows-latest
5-
- check-success=python3.8-x64 ubuntu-latest
6-
- check-success=python3.8-x64 macOS-latest
74
- check-success=python3.9-x64 windows-latest
85
- check-success=python3.9-x64 ubuntu-latest
96
- check-success=python3.9-x64 macOS-latest

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ rustworkx-core = { path = "rustworkx-core", version = "=0.16.0" }
6363

6464
[dependencies.pyo3]
6565
version = "0.21.2"
66-
features = ["abi3-py38", "extension-module", "hashbrown", "num-bigint", "num-complex", "indexmap"]
66+
features = ["abi3-py39", "extension-module", "hashbrown", "num-bigint", "num-complex", "indexmap"]
6767

6868
[dependencies.sprs]
6969
version = "^0.11"

constraints.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
decorator==4.4.2
2-
importlib-metadata==4.13.0;python_version<'3.8'
32
pillow<10.0.0;python_version<'3.13'
43
lxml==5.1.1

noxfile.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@
1212
]
1313

1414
lint_deps = [
15-
"black~=22.0",
16-
"ruff~=0.1",
15+
"black~=24.8",
16+
"ruff~=0.6",
1717
"setuptools-rust",
1818
]
1919

2020
stubs_deps = [
21-
"mypy==1.8.0",
21+
"mypy==1.11.2",
2222
"typing-extensions",
2323
]
2424

2525
def install_rustworkx(session):
2626
session.install(*deps)
27-
session.install(".[all]", "-c", "constraints.txt")
27+
session.install(".", "-c", "constraints.txt")
2828

2929
# We define a common base such that -e test triggers a test with the current
3030
# Python version of the interpreter and -e test_with_version launches
@@ -38,7 +38,7 @@ def base_test(session):
3838
def test(session):
3939
base_test(session)
4040

41-
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"])
41+
@nox.session(python=["3.9", "3.10", "3.11", "3.12"])
4242
def test_with_version(session):
4343
base_test(session)
4444

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[tool.black]
66
line-length = 100
7-
target-version = ['py38', 'py39', 'py310', 'py311']
7+
target-version = ['py39', 'py310', 'py311', 'py312']
88

99
[tool.ruff]
1010
line-length = 105 # more lenient than black due to long function signatures
@@ -16,7 +16,7 @@ lint.select = [
1616
"PYI", # flake8-pyi
1717
"Q", # flake8-quotes
1818
]
19-
target-version = "py38"
19+
target-version = "py39"
2020
extend-exclude = ["doc"]
2121

2222
[tool.ruff.lint.per-file-ignores]
@@ -26,11 +26,11 @@ extend-exclude = ["doc"]
2626
[tool.cibuildwheel]
2727
manylinux-x86_64-image = "manylinux2014"
2828
manylinux-i686-image = "manylinux2014"
29-
skip = "pp* cp36-* cp37-* *win32 *musllinux*i686"
29+
skip = "pp* cp36-* cp37-* cp38-* *win32 *musllinux*i686"
3030
test-requires = "networkx"
3131
test-command = "python -m unittest discover {project}/tests"
3232
before-build = "pip install -U setuptools-rust"
33-
test-skip = "cp38-*musllinux* *linux_s390x *ppc64le"
33+
test-skip = "*linux_s390x *ppc64le"
3434

3535
[tool.cibuildwheel.linux]
3636
before-all = "yum install -y wget && {package}/tools/install_rust.sh"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
upgrade:
3+
- |
4+
The minimum supported Python version for using rustworkx has been raised to Python 3.9.
5+
Python 3.8 has reached it's end-of-life and will no longer be supported. To use rustworkx
6+
you will need to ensure you are using Python >=3.9.

0 commit comments

Comments
 (0)