Skip to content

Commit a04f30c

Browse files
committed
fix: support Python 3.13 via ABI3 forward compat, bump to 0.1.1
1 parent 9ab2edc commit a04f30c

4 files changed

Lines changed: 16 additions & 6 deletions

File tree

.github/workflows/python.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ permissions:
1515

1616
env:
1717
PACKAGE_DIR: treeshap-py
18+
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
1819

1920
jobs:
2021
build:
@@ -44,7 +45,12 @@ jobs:
4445

4546
- uses: actions/setup-python@v5
4647
with:
47-
python-version: "3.12"
48+
python-version: |
49+
3.9
50+
3.10
51+
3.11
52+
3.12
53+
3.13
4854
4955
- name: Build wheels
5056
uses: PyO3/maturin-action@v1
@@ -78,19 +84,20 @@ jobs:
7884
path: ${{ env.PACKAGE_DIR }}/dist/*.tar.gz
7985

8086
test-wheel:
81-
name: Test (${{ matrix.os }})
87+
name: Test (${{ matrix.os }}, py${{ matrix.python }})
8288
needs: build
8389
strategy:
8490
fail-fast: false
8591
matrix:
8692
os: [ubuntu-latest, macos-latest, windows-latest]
93+
python: ["3.9", "3.12", "3.13"]
8794
runs-on: ${{ matrix.os }}
8895
steps:
8996
- uses: actions/checkout@v4
9097

9198
- uses: actions/setup-python@v5
9299
with:
93-
python-version: "3.12"
100+
python-version: ${{ matrix.python }}
94101

95102
- uses: actions/download-artifact@v4
96103
with:

treeshap-py/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "treeshap-py"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
edition = "2021"
55
rust-version = "1.75"
66
publish = false

treeshap-py/pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "maturin"
44

55
[project]
66
name = "treeshap"
7-
version = "0.1.0"
7+
version = "0.1.1"
88
description = "Exact TreeSHAP in Rust — fast Shapley values for XGBoost, LightGBM, and ONNX tree ensembles"
99
license = {text = "MIT OR Apache-2.0"}
1010
requires-python = ">=3.8"
@@ -38,3 +38,6 @@ Changelog = "https://github.com/saswatsusmoy/treeshap-rs/releases"
3838
features = []
3939
python-source = "python"
4040
module-name = "treeshap._treeshap"
41+
42+
[tool.maturin.environment]
43+
PYO3_USE_ABI3_FORWARD_COMPATIBILITY = "1"

treeshap-py/python/treeshap/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
from treeshap._treeshap import TreeEnsemble, ShapExplainer, ShapExplanation
1818

1919
__all__ = ["TreeEnsemble", "ShapExplainer", "ShapExplanation"]
20-
__version__ = "0.1.0"
20+
__version__ = "0.1.1"

0 commit comments

Comments
 (0)