Skip to content

Bump inline script metadata to Python 3.11 - #74152

Open
shahar1 wants to merge 2 commits into
drop-py310/1-ci-breeze-dockerfrom
drop-py310/2-script-metadata
Open

shahar1 wants to merge 2 commits into
drop-py310/1-ci-breeze-dockerfrom
drop-py310/2-script-metadata

Conversation

@shahar1

@shahar1 shahar1 commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Bumps Python version to 3.11 in every inline script definition (# requires-python).

related: #74148

AI Summary PEP 723 `# requires-python` metadata in `scripts/ci/prek/*.py` and `dev/**` moves from 3.10 to 3.11 (`>=3.11,<3.12` for prek hooks that pin a single minor, `>=3.11` elsewhere). The `tomli` backport is dropped from the inline dependency lists because `tomllib` is in the standard library from 3.11. prek picks the hook interpreter from this header, so this layer has to precede any hook using 3.11-only APIs. The three diagram PNG/md5 pairs are regenerated because their generator scripts carry the header.

Stack

Layer 2 of 9 of the Python 3.10 drop (supersedes #74144, which carried the whole change in one PR). Each layer is meant to be green on its own: the script metadata bump comes first because prek picks the hook interpreter from it, and the ruff fixes land before the requires-python bump because ruff infers its target per distribution from the nearest pyproject.toml.

  1. Drop Python 3.10 from CI, Breeze and the container images
  2. Bump inline script metadata to Python 3.11
  3. Remove Python 3.10 compatibility shims
  4. Apply ruff Python 3.11 fixes to core, Task SDK, shared and airflowctl
  5. Apply ruff Python 3.11 fixes to providers
  6. Apply ruff Python 3.11 fixes to dev tooling, scripts and test suites
  7. Require Python 3.11 in all distributions
  8. Update provider READMEs for the Python 3.11 baseline
  9. Update docs for the Python 3.11 baseline

Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Fable 5.1)

Generated-by: Claude Code (Fable 5.1) following the guidelines

@shahar1
shahar1 force-pushed the drop-py310/2-script-metadata branch from a729734 to 9c9303d Compare October 3, 2026 13:07
@shahar1
shahar1 added this pull request to stack #74160 October 3, 2026 13:08
@shahar1 shahar1 mentioned this pull request Oct 3, 2026
1 task done
@shahar1
shahar1 force-pushed the drop-py310/2-script-metadata branch from 9c9303d to b337259 Compare October 3, 2026 13:38
@shahar1
shahar1 marked this pull request as ready for review October 3, 2026 13:49
@shahar1
shahar1 force-pushed the drop-py310/2-script-metadata branch 2 times, most recently from 5210382 to 861d045 Compare October 3, 2026 20:05
@shahar1
shahar1 requested a review from henry3260 as a code owner October 4, 2026 06:41
@shahar1
shahar1 force-pushed the drop-py310/2-script-metadata branch from 861d045 to 35f7d63 Compare October 4, 2026 17:53
@shahar1 shahar1 added the ready for maintainer review Set after triaging when all criteria pass. label Oct 4, 2026
The prek hooks and dev scripts declare the interpreter they run under
in PEP 723 metadata, and prek picks the hook interpreter from it, so
this has to land before any hook starts using 3.11-only APIs. With
Python 3.10 gone from the project they can also drop the tomli backport from their dependency lists, because
tomllib is in the standard library from 3.11.
@potiuk
potiuk force-pushed the drop-py310/2-script-metadata branch from 228f3fc to f4ade48 Compare October 4, 2026 23:43

This branch has not been deployed

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

Labels

area:API Airflow's REST/HTTP API area:dev-tools kind:documentation ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant