Add Python 3.14 support (#1100) #1104
Open
+11
−8
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 PR adds Python 3.14 support to py-libp2p.
Changes
pyproject.tomltox.inito include Python 3.14 in test environments (core, lint, wheel, interop)Testing
make prmake docsKnown Issue: coincurve Dependency
Current Status: Python 3.14 CI tests are currently failing due to a build issue with
coincurve==21.0.0, not with Python 3.14 itself.Root Cause:
The error
RuntimeError: Expected exactly one LICENSE file in cffi distribution, got 0occurs duringcoincurve's build process when it checks for LICENSE files in thecffidistribution. This is a known compatibility issue betweencoincurve==21.0.0andcffi2.0.0 (required for Python 3.14).Fix Status:
The fix is already merged in coincurve's master branch:
However, the latest coincurve release is v21.0.0 (March 8, 2025), which predates these fixes. Once coincurve releases a new version (likely v21.0.1 or v22.0.0) with these fixes, we can update the dependency and Python 3.14 CI tests should pass.
References:
get_cffi_distribution_license_files()ofek/coincurve#188INetwork.notify#219: python 3.14 ofek/coincurve#219black --checkto Makefile #208: pip install fails with coincurve-21.0.0 but works with coincurve-20.0.0 on Windows ofek/coincurve#208Status
✅ Python 3.14 support added to codebase
✅ All configuration files updated
⏳ Waiting for coincurve release with Python 3.14 fix
Note: The PR is ready to merge from a code perspective, but CI will fail for Python 3.14 until the coincurve dependency is updated.
Closes #1100