Add an opt-in ABI3T build for aiscat - #621
Draft
honglei wants to merge 1 commit into
Draft
Conversation
jvde-github
force-pushed
the
main
branch
3 times, most recently
from
September 6, 2026 22:14
d7f28d4 to
e375519
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the implementation draft discussed in #620. It is intentionally
opt-in and additive: the version-specific wheels remain the preferred path.
The conversion loop does not fork in this version.
convert_object,convert_value, andwrap_annotatedremain the single semanticimplementation. The two performance-sensitive ABI differences are isolated in
small helpers:
_PyDict_NewPresized; ABI3T usesPyDict_New;PyList_SET_ITEM; ABI3T uses the checkedPyList_SetItemcall.The larger conditional section is outside the conversion loop: ABI3T needs a
negative-basicsize heap type,
PyObject_GetTypeData, and thePyModExport__coremodule export hook becausePyObject_HEADis opaque.For maintenance, I would treat the shared conversion semantics as the sole
reference implementation. The version-specific build is the performance
baseline, with ABI-specific mechanics kept at the narrow boundaries above.
Both variants run the same decode tests, including annotated output and all
supported input object types.
The build uses scikit-build-core 1.0.3's ABI3T signal as the single source for
the source ABI, Stable-ABI linkage, suffix, and combined wheel tag. A
free-threaded Python 3.15 build produces
cp315-abi3.abi3t/_core.abi3t.so; an inconsistent classic-ABI request isrejected rather than producing a mislabeled wheel. The ABI3T command requests
CMake 3.26+ explicitly, while ordinary version-specific builds retain their
existing CMake 3.15 floor.
Current validation
the GIL still disabled, and on a GIL-enabled Python 3.15 build.
PyModExport__core, notPyInit__core; all 45imported CPython symbols are in the CPython 3.15.0rc1 Stable ABI manifest.
ABI3T
feed()median was 6.58% below cp315t at one thread and 5.04% below atfour threads. This supports retaining cp315t as the preferred artifact.
This is not merge-ready release plumbing. An actual Windows wheel build/import
(including DLL dependency inspection), ABI3T-aware auditing once available,
and a separately controlled CI/release job remain open gates.