Description: Build against pyo3's stable ABI (abi3-py310) using Debian's pyo3 0.28.
 Debian ships pyo3 0.28, not 0.29. Enabling the abi3-py310 feature makes the
 extension load against the Python stable ABI, so a single build works for
 every Python >= 3.10 -- including both python3.13 and python3.14, which
 python3-all currently pulls in.
 .
 Also configure setuptools-rust and bdist_wheel to emit the abi3-tagged
 filename (_yaml_edit.abi3.so) so dh_python3 sees a single stable-ABI module
 rather than a CPython-specific one.
Author: Jelmer Vernooĳ <jelmer@debian.org>
Forwarded: not-needed
Last-Update: 2026-09-08

Index: b/Cargo.toml
===================================================================
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@ name = "_yaml_edit"
 crate-type = ["cdylib"]
 
 [dependencies]
-pyo3 = { version = ">=0.29,<0.31", features = ["extension-module"] }
+pyo3 = { version = ">=0.28,<0.31", features = ["extension-module", "abi3-py310"] }
 yaml-edit = "0.3.5"
 # Only for `rowan::ast::AstNode`, to reach the syntax nodes behind yaml-edit's
 # wrappers; keep in step with the rowan version yaml-edit uses.
Index: b/pyproject.toml
===================================================================
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -31,6 +31,10 @@ where = ["python"]
 target = "yaml_edit._yaml_edit"
 path = "Cargo.toml"
 binding = "PyO3"
+py-limited-api = true
+
+[tool.distutils.bdist_wheel]
+py_limited_api = "cp310"
 
 [tool.setuptools.package-data]
 yaml_edit = ["py.typed", "*.pyi"]
