Skip to content

Commit 4196600

Browse files
authored
Drop support for Python 3.9 (#615)
1 parent 08d6962 commit 4196600

35 files changed

Lines changed: 237 additions & 304 deletions

‎.github/workflows/ci.yml‎

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ concurrency:
99
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
1010
cancel-in-progress: true
1111

12-
# Setting a fixed target dir ensures that all builds of examples re-use the same common dependencies
1312
env:
13+
# Setting a fixed target dir ensures that all builds of examples re-use the same common dependencies
1414
CARGO_TARGET_DIR: ${{ github.workspace }}/target
1515

1616
jobs:
@@ -68,16 +68,17 @@ jobs:
6868
matrix:
6969
python-version:
7070
[
71-
"3.9",
7271
"3.10",
7372
"3.11",
7473
"3.14",
7574
"3.13",
76-
"3.13t",
7775
"3.14",
7876
"3.14t",
77+
"3.15",
78+
"3.15t",
7979
"pypy-3.11",
80-
"graalpy25.0",
80+
"graalpy-25.2", # 3.12
81+
"graalpy-25.3", # 3.13
8182
]
8283
platform:
8384
[
@@ -130,23 +131,6 @@ jobs:
130131
python-architecture: "arm64",
131132
rust-target: "aarch64-unknown-linux-gnu",
132133
}
133-
exclude:
134-
# macOS arm doesn't have Python builds before 3.10
135-
- python-version: 3.9
136-
platform:
137-
{
138-
os: "macos-latest",
139-
python-architecture: "arm64",
140-
rust-target: "aarch64-apple-darwin",
141-
}
142-
# no graalpy available on Windows
143-
- python-version: graalpy25.0
144-
platform:
145-
{
146-
os: "windows-latest",
147-
python-architecture: "x64",
148-
rust-target: "x86_64-pc-windows-msvc",
149-
}
150134

151135
env:
152136
SETUPTOOLS_RUST_CARGO_PROFILE: dev
@@ -197,6 +181,9 @@ jobs:
197181
- name: Test sdist vendor Rust crates
198182
shell: bash
199183
run: nox -s test-sdist-vendor
184+
# FIXME: graalpy on windows appears to have issues with the sdist process, needs investigation and
185+
# reporting upstream.
186+
continue-on-error: ${{ matrix.platform.os == 'windows-latest' && startsWith(matrix.python-version, 'graalpy') }}
200187
env:
201188
CARGO_BUILD_TARGET: ${{ matrix.platform.rust-target }}
202189

@@ -357,7 +344,7 @@ jobs:
357344
targets: aarch64-apple-darwin,x86_64-apple-darwin
358345
- uses: pypa/cibuildwheel@v3.4.1
359346
env:
360-
CIBW_BUILD: cp39-*
347+
CIBW_BUILD: cp310-*
361348
CIBW_BEFORE_BUILD: >
362349
pip install -U 'pip>=23.2.1' 'setuptools>=70.1.0' 'auditwheel>=5.4.0'
363350
&& pip install -e .
@@ -390,6 +377,8 @@ jobs:
390377
rust_target: i686-pc-windows-gnu,
391378
},
392379
]
380+
env:
381+
CARGO_BUILD_TARGET: ${{ matrix.rust_target }}
393382
steps:
394383
- uses: actions/checkout@v6
395384
- name: Install MSys2 and dependencies
@@ -404,9 +393,9 @@ jobs:
404393
mingw-w64-${{ matrix.arch }}-openssl
405394
mingw-w64-${{ matrix.arch }}-toolchain
406395
407-
- uses: dtolnay/rust-toolchain@master
396+
- uses: dtolnay/rust-toolchain@stable
408397
with:
409-
toolchain: stable-${{ matrix.rust_target }}
398+
targets: ${{ matrix.rust_target }}
410399

411400
- name: Install test dependencies
412401
shell: msys2 {0}

‎CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## Unreleased
4+
### Packaging
5+
- Drop support for Python 3.9.
6+
- Bump `setuptools` minimum version to 83.0.
7+
38
## 1.13.0 (2026-06-27)
49
### Added
510
- Add `generated-files` option to `RustExtension` to copy files from the build script output directory to the wheel. [#574](https://github.com/PyO3/setuptools-rust/pull/574)

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ version = "0.1.0"
6969
edition = "2021"
7070

7171
[dependencies]
72-
pyo3 = "0.25"
72+
pyo3 = "0.29.3"
7373

7474
[lib]
7575
name = "_lib" # private module to be nested into Python package,

‎docs/conf.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,10 @@ def basetext(o):
8080
for t in node.traverse(basetext):
8181
t1 = Text(t.replace(DOCS_URL, "", 1), t.rawsource)
8282
t.parent.replace(t, t1)
83-
return
8483

8584

8685
# end of class
8786

8887

8988
def setup(app):
9089
app.add_transform(RelativeDocLinks)
91-
return

‎examples/generated-files/Cargo.lock‎

Lines changed: 10 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎examples/generated-files/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2021"
55
build = "build.rs"
66

77
[dependencies]
8-
pyo3 = "0.27"
8+
pyo3 = "0.29.3"
99

1010
[lib]
1111
name = "_lib" # private module to be nested into Python package

‎examples/generated-files/python/generated_files/__init__.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
__all__ = ["library_ok", "data_files_content"]
1+
__all__ = ["data_files_content", "library_ok"]
22

33
from pathlib import Path
4+
45
from ._lib import library_ok
56

67

‎examples/generated-files/tests/test_lib.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from pathlib import Path
2+
23
import generated_files
34

45

‎examples/hello-world-setuppy/Cargo.lock‎

Lines changed: 10 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎examples/hello-world-setuppy/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
pyo3 = "0.28"
7+
pyo3 = "0.29.3"
88

99
[lib]
1010
# See https://github.com/PyO3/pyo3 for details

0 commit comments

Comments
 (0)