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: python3-yaml-edit/Cargo.toml
===================================================================
--- python3-yaml-edit.orig/Cargo.toml
+++ python3-yaml-edit/Cargo.toml
@@ -13,5 +13,5 @@ name = "_yaml_edit"
 crate-type = ["cdylib"]

 [dependencies]
-pyo3 = { version = "0.29", features = ["extension-module"] }
+pyo3 = { version = "0.28", features = ["extension-module", "abi3-py310"] }
 yaml-edit = "0.3"
Index: python3-yaml-edit/pyproject.toml
===================================================================
--- python3-yaml-edit.orig/pyproject.toml
+++ python3-yaml-edit/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"]
