← Back to Pull requests

feat: first-class 3.13t/3.14t free-threaded python install selectors #2334

Closed
unknown closed this pull request without merging on Jul 16, 2026 04:35 UTC
View on GitHub
unknown unknown commented on Jul 02, 2026 13:13 UTC
Author

Summary

Adds first-class free-threaded CPython install selectors so hatch python install 3.13t / 3.14t (and resolution by those names) target the free-threaded builds directly, installable side by side with the regular 3.13 / 3.14. The t suffix is now a recognized variant rather than an unknown distribution name.

Why this matters

Issue #1907 asks for a clean way to install the free-threaded (t) Python builds. Before this, 3.13t/3.14t were not recognized selectors, so users could not install the free-threaded interpreters through hatch python the way they install the standard builds, and a 3.13t name did not resolve to a distribution.

This teaches the resolver to parse the t suffix as a free-threaded variant and map it to the corresponding free-threaded distribution, keeping the existing resolution behavior for non-t names unchanged. A regular 3.13 and a 3.13t can be installed and managed side by side.

Changes

  • python/resolve.py: recognize the t free-threaded suffix in selector resolution, alongside the existing CPU-variant handling, and reject invalid suffixes rather than silently mis-resolving.

  • python/core.py: allow the free-threaded distribution to be selected/installed independently of its non-free-threaded counterpart.
  • Testing

    pytest tests/python/test_resolve.py tests/python/test_core.py (run via uv run with the project installed) passes, covering: 3.13t/3.14t selector resolution, invalid-suffix rejection, interaction with CPU variant selection, unchanged compatible/all selection, and installing 3.13 and 3.13t side by side.

    Fixes #1907

    Diff: 204 lines (+153 / -51) across 2 files Reviewer: cjames23 Review duration: 19642m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 204 lines diff across 2 files
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.318
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #2334"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.3% (MEDIUM) · Higher = larger blast radius
    36.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.3% · Safe to merge
    14.3%
    Repository