python: add support for the CPython stable ABI (cp310-abi3 wheels)#244
Open
danceratopz wants to merge 2 commits into
Open
python: add support for the CPython stable ABI (cp310-abi3 wheels)#244danceratopz wants to merge 2 commits into
danceratopz wants to merge 2 commits into
Conversation
The cffi-generated extension module has always been compiled with Py_LIMITED_API (cffi's default): the shipped modules are named _ethash.abi3.so and the Windows .pyd links python3.dll. The wheels were just tagged with the interpreter that built them, so each release only covered the Python versions it was built for and newer versions (e.g. 3.14) fall back to an sdist build requiring cmake and a C toolchain. Tell bdist_wheel about the limited API so wheels are tagged cp310-abi3, matching python_requires='>=3.10'. A single wheel per platform now covers Python 3.10 and all later versions, so build with only one interpreter per platform in CI. Note the abi3 tag does not apply to free-threaded builds; those still use the sdist.
chfast
requested changes
Jul 15, 2026
chfast
left a comment
Owner
There was a problem hiding this comment.
Please remove the release 1.1.1 from the PR. We will do the release after.
And cut the PR description to the merit (add support for python stable API).
The version number and release date are decided at release time.
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.
The cffi-generated extension module is already compiled against the stable ABI (
Py_LIMITED_APIis cffi's default): the shipped modules are_ethash.abi3.so, and the Windows.pydlinkspython3.dll. Only the wheel tags are per-version, becausebdist_wheelis never told about the limited API.setup.cfgwith[bdist_wheel] py_limited_api = cp310(matchingpython_requires='>=3.10'), so wheels are taggedcp310-abi3: a single wheel per platform covers CPython 3.10 and all later versions, including 3.14.scripts/ci/python_build_wheels.shto a single interpreter per platform.auditwheel repairpreserves the abi3 tag.Programming Language :: Python :: 3.14classifier.Verified:
uv build --wheelproducesethash-1.1.0-cp310-abi3-linux_x86_64.whl, which installs and passes the binding tests on CPython 3.14 in a container without cmake or a C toolchain. (abi3 does not apply to free-threaded builds or PyPy; those keep using the sdist.)Fixes the sdist fallback described in ethereum/execution-specs#3173.