Skip to content

ci: Add Python 3.13t and 3.14t (free-threaded) to testing matrix#817

Draft
xsub wants to merge 1 commit into
ronf:developfrom
xsub:test-free-threading
Draft

ci: Add Python 3.13t and 3.14t (free-threaded) to testing matrix#817
xsub wants to merge 1 commit into
ronf:developfrom
xsub:test-free-threading

Conversation

@xsub

@xsub xsub commented Jul 5, 2026

Copy link
Copy Markdown

This PR adds Python 3.13t and 3.14t (the experimental free-threaded builds) to the testing matrix.

Since Python 3.13, PEP 703 introduces a GIL-less build. Adding this to the CI early helps uncover hidden data-races and ensures thread-safety without the GIL. The actions/setup-python action supports 3.13t out of the box.

Note: asyncssh relies on cryptography, which currently lacks full free-threaded ABI support (see pyca/cryptography#15063). This CI run will track upstream compatibility and serve as a baseline diagnostic.

If the tests pass without the GIL, the project is safely compatible with the free-threaded ecosystem. If they fail, this run provides high-value logs regarding global mutable state or dependency blockers.

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.84%. Comparing base (fab96ac) to head (07b38ca).
⚠️ Report is 197 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #817      +/-   ##
===========================================
- Coverage    99.85%   99.84%   -0.02%     
===========================================
  Files           95      102       +7     
  Lines        27784    32034    +4250     
  Branches      2908     3096     +188     
===========================================
+ Hits         27743    31983    +4240     
- Misses          38       45       +7     
- Partials         3        6       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ronf

ronf commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Looks like all of the new tests failed, but on Ubuntu and Windows they failed very early, when trying to find the right Python environment. It looks like macOS got a bit further and began running the tests, but there were crashes.

@xsub

xsub commented Jul 6, 2026

Copy link
Copy Markdown
Author

Hi @ronf, thanks for looking into this so quickly!

The behaviors you're seeing match the current state of the broader PEP 703 migration ecosystem:

  1. Ubuntu/Windows Early Failures: This is an upstream packaging and infrastructure issue. Because libraries like cryptography don't yet publish pre-built wheels (.whl) for 3.13t and 3.14t, the CI attempts to compile them from source. This frequently fails immediately on Linux and Windows runners due to incomplete free-threaded CFFI or PyO3 build support.
  2. macOS Crashes: The macOS runner managed to compile the dependencies and actually execute the test suite. The crashes you're seeing during the tests are likely true free-threading concurrency faults (e.g., Segmentation Faults). Without the GIL, the underlying C-extensions temporarily lose their implicit thread-safety, causing memory access violations during async operations.

Since we know this is currently blocked at the upstream extension level (specifically abi3t support tracked in pyca/cryptography#15063), I suggest we convert this PR to a Draft.

We can leave it open as an automated tracker. Once cryptography and other core dependencies release their free-threaded wheels, we can re-trigger this workflow to verify if asyncssh becomes natively GIL-free or if further patches are needed.

What do you think about that?

@ronf ronf marked this pull request as draft July 6, 2026 21:52
@ronf

ronf commented Jul 6, 2026

Copy link
Copy Markdown
Owner

That sounds good to me... I'm fine with keeping this open in the meantime. I've gone ahead and made this into a Draft.

Thanks for submitting this. I have seen comments about the free-threading work, but haven't tracked it closely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants