← Back to Pull requests

chore(py): raise minimum Python version to 3.11 #2967

Open
mini-1235 opened this pull request with 261 lines diff across 3 files
View on GitHub
mini-1235 mini-1235 commented on Nov 25, 2026 09:31 UTC
Author

Raises py-rattler-build's minimum Python version from 3.10 to 3.11, as discussed on Discord.

Python 3.10 reached end of life on 2026-10-01 (PEP 619), and conda-forge's python_min is already 3.11, so the conda-forge builds have required cpython >=3.11 since 0.73.0.

This also fixes a missing dependency: progress.py imports Self from typing_extensions, which isn't a declared dependency. In environments without it, every progress callback fails with ModuleNotFoundError: No module named 'typing_extensions'. With 3.11 as the minimum, Self comes from typing.

Changes

  • pyproject.toml: requires-python, ruff target-version and ty python-version move from 3.10 to 3.11

  • rust/Cargo.toml: pyo3 abi3-py310 → abi3-py311

  • pixi.toml: build variant and test environment move to 3.11; pixi.lock regenerated

  • Root pixi.lock: regenerated, since the docs environment depends on the local py-rattler-build and records its Python requirement

  • progress.py: from typing import Self instead of typing_extensions

  • Ruff UP017 fixes (timezone.utc → datetime.UTC) in three test files and one notebook. The rule applies now that the target is py311.

  • python-build.yml: the aarch64 wheel test runs on Ubuntu 24.04 (Python 3.12) instead of 22.04 (Python 3.10, below the new minimum), with --break-system-packages as in the Alpine job
  • Testing

  • Python 3.11.18: ruff check, ruff format, ty and pytest all pass (192 passed, 5 skipped).

  • Python 3.15.2: pytest against the same abi3-py311 extension built on 3.11 (192 passed, 5 skipped).

  • Imported the new progress.py without typing_extensions installed on 3.11 and 3.14.
  • pixi.lock was regenerated with pixi 0.84.2, which also reformatted some entries. No package versions changed besides the Python 3.10 → 3.11 builds. I'm happy to regenerate it with your pixi version if you prefer a smaller diff.

    ---

    This PR description was AI-generated with Claude Opus 5.5 (claude-opus-5-5).

    🤖 Generated with Claude Code

    Diff: 261 lines (+195 / -66) across 3 files Reviewer: None requested Review duration: 10230m
    All Vouch review confidence checks passed
    Residual risk 0.29 = Change Risk (0.51) × (1 − Review Confidence (0.44)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.51 · 261 lines diff across 3 files
    0.51
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 10%
    44%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.333
    No Reviewer Assigned no_reviewer_assigned
    0.120
    Real PR Conversation Timeline
    1 comments
    "Review active on #2967"
    general weight: 0.35
    Reviewers
    None requested
    Assignees
    mini-1235 mini-1235
    Labels
    risk: low confidence: 44.2% 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: 51.2% (MEDIUM) · Higher = larger blast radius
    51.2%
    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: 44.2% · Lower = rushed or shallow review
    44.2%
    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: 28.6% · Safe to merge
    28.6%