Skip to content

Commit 420d002

Browse files
committed
chore(python): Migrate to ABI3
Signed-off-by: Dmitry Dygalo <[email protected]>
1 parent a1ffac5 commit 420d002

File tree

10 files changed

+355
-150
lines changed

10 files changed

+355
-150
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Python Release Verify
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
defaults:
10+
run:
11+
shell: bash
12+
13+
env:
14+
PACKAGE_NAME: jsonschema_rs
15+
PYTHON_VERSION: "3.10"
16+
17+
jobs:
18+
wheel-smoke-test:
19+
runs-on: ubuntu-22.04
20+
steps:
21+
- uses: actions/checkout@v5
22+
23+
- uses: actions/setup-python@v6
24+
with:
25+
python-version: ${{ env.PYTHON_VERSION }}
26+
27+
- uses: dtolnay/rust-toolchain@stable
28+
29+
- uses: Swatinem/rust-cache@v2
30+
31+
- name: Install maturin
32+
run: pip install maturin
33+
34+
- name: Build wheel
35+
run: |
36+
maturin build --release -m crates/jsonschema-py/Cargo.toml --out dist --interpreter $PYTHON_VERSION
37+
38+
- name: Install built wheel
39+
run: |
40+
pip install dist/${PACKAGE_NAME}-*.whl --force-reinstall
41+
*** End Patch*** End Patch to File: .github/workflows/python-release-verify.yml

.github/workflows/python-release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
runs-on: macos-13
5353
strategy:
5454
matrix:
55-
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14' ]
55+
python-version: [ '3.10' ]
5656
steps:
5757
- uses: actions/checkout@v5
5858
- uses: actions/setup-python@v6
@@ -71,14 +71,14 @@ jobs:
7171
- name: Upload wheels
7272
uses: actions/upload-artifact@v5
7373
with:
74-
name: wheel-macos-x86_64-py${{ matrix.python-version }}
74+
name: wheel-macos-x86_64
7575
path: dist
7676

7777
macos-universal:
7878
runs-on: macos-13
7979
strategy:
8080
matrix:
81-
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14' ]
81+
python-version: [ '3.10' ]
8282
steps:
8383
- uses: actions/checkout@v5
8484
- uses: actions/setup-python@v6
@@ -96,14 +96,14 @@ jobs:
9696
- name: Upload wheels
9797
uses: actions/upload-artifact@v5
9898
with:
99-
name: wheel-macos-universal-py${{ matrix.python-version }}
99+
name: wheel-macos-universal
100100
path: dist
101101

102102
windows:
103103
runs-on: windows-2022
104104
strategy:
105105
matrix:
106-
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14' ]
106+
python-version: [ '3.10' ]
107107
target: [ x64, x86 ]
108108
steps:
109109
- uses: actions/checkout@v5
@@ -124,14 +124,14 @@ jobs:
124124
- name: Upload wheels
125125
uses: actions/upload-artifact@v5
126126
with:
127-
name: wheel-windows-${{ matrix.target }}-py${{ matrix.python-version }}
127+
name: wheel-windows-${{ matrix.target }}
128128
path: dist
129129

130130
linux:
131131
runs-on: ubuntu-22.04
132132
strategy:
133133
matrix:
134-
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14' ]
134+
python-version: [ '3.10' ]
135135
target: [ x86_64, i686, aarch64 ]
136136
steps:
137137
- uses: actions/checkout@v5
@@ -169,7 +169,7 @@ jobs:
169169
- name: Upload wheels
170170
uses: actions/upload-artifact@v5
171171
with:
172-
name: wheel-linux-${{ matrix.target }}-py${{ matrix.python-version }}
172+
name: wheel-linux-${{ matrix.target }}
173173
path: dist
174174

175175
release:

crates/jsonschema-py/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
### Changed
6+
7+
- Dropped Python 3.8-3.9 support in `jsonschema-py` and now publish abi3 wheels targeting Python 3.10+.
8+
59
## [0.34.0] - 2025-11-14
610

711
### Added

crates/jsonschema-py/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ crate-type = ["cdylib"]
1717

1818
[dependencies]
1919
jsonschema = { path = "../jsonschema/" }
20-
pyo3 = { version = "0.27", features = ["extension-module"] }
20+
pyo3 = { version = "0.27", features = ["extension-module", "abi3-py310"] }
2121
pyo3-built = "0.6"
2222
pythonize = "0.27"
2323
serde.workspace = true

crates/jsonschema-py/pyproject.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ classifiers = [
2222
"Operating System :: OS Independent",
2323
"Programming Language :: Python :: 3",
2424
"Programming Language :: Python :: 3 :: Only",
25-
"Programming Language :: Python :: 3.8",
26-
"Programming Language :: Python :: 3.9",
2725
"Programming Language :: Python :: 3.10",
2826
"Programming Language :: Python :: 3.11",
2927
"Programming Language :: Python :: 3.12",
@@ -33,7 +31,7 @@ classifiers = [
3331
"Programming Language :: Rust",
3432
"Topic :: File Formats :: JSON :: JSON Schema",
3533
]
36-
requires-python = ">=3.8"
34+
requires-python = ">=3.10"
3735

3836
[project.optional-dependencies]
3937
tests = [
@@ -61,7 +59,7 @@ include = [{ path = "rust-toolchain.toml", format = ["sdist", "wheel"] }]
6159

6260
[tool.ruff]
6361
line-length = 120
64-
target-version = "py38"
62+
target-version = "py310"
6563

6664
[tool.ruff.lint]
6765
select = [

crates/jsonschema-py/src/ffi.rs

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)