shahar1 opened a new pull request, #74144:
URL: https://github.com/apache/airflow/pull/74144

   Drop Python 3.10 support from Airflow, Task SDK, airflowctl, providers, 
shared libraries, the Helm chart tooling and the dev/CI toolchain. The minimum 
supported Python is now 3.11; the default CI/breeze Python moves from 3.10 to 
3.11.
   
   Python 3.10 reaches end of life in October 2026, and an increasing number of 
our dependencies have already dropped it (see the `--no-explain-why` workaround 
in `finalize-tests.yml`, which this PR removes along with 3.10).
   
   ### What changes
   
   - `requires-python = ">=3.11"` and the `Programming Language :: Python :: 
3.10` classifier removed in every `pyproject.toml` (core, task-sdk, 
airflow-ctl, all providers, `shared/*`, dev/test distributions). `uv.lock` 
files regenerated.
   - Breeze: `ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS` / 
`ALL_PYTHON_MAJOR_MINOR_VERSIONS` are `3.11`–`3.14`; providers compatibility 
matrix runs on 3.11; the dead `PYTHON_TO_MIN_AIRFLOW_MAPPING` constant and its 
unused `is_airflow_version_supported_for_python` helper are removed.
   - CI/Docker: default Python `3.11` in composite actions, workflows, 
devcontainer, `Dockerfile`/`Dockerfile.ci` and `scripts/docker`. The PGP branch 
for verifying the Python source tarball is removed (3.11+ ships Sigstore 
bundles); the `python-3.10.asc` key and its entry in 
`update_docker_gpg_keys.py` go with it.
   - Code: `tomli` fallbacks replaced by `tomllib`; `typing_extensions` imports 
of `Self`/`Unpack`/`assert_never` replaced by `typing`; the `asyncio.Runner` 
re-implementation in `BaseOperator.event_loop()` removed; `sys.version_info < 
(3, 11)` test skips removed. `tomli` dropped from `build-system.requires` and 
prek hook dependencies.
   - Ruff: with the new baseline ruff rewrites `timezone.utc` to `datetime.UTC` 
(UP017) and `Unpack[tuple[...]]` to `*tuple[...]` (UP044) across the repo - 
that is the bulk of the diff. `UP042` (`str, Enum` -> `StrEnum`) and `ASYNC109` 
become reportable on 3.11 and are added to the ruff ignore list with a 
rationale: both change runtime behaviour or public signatures and need per-site 
judgement.
   - Inline script metadata (`# requires-python`) in `scripts/ci/prek/*.py` and 
`dev/**` bumped to 3.11; docs, READMEs, contributing docs and generated files 
updated (`update-tested-versions`, `update-supported-versions`, 
`update-pyproject-toml`, `generate-pypi-readme`, `update-breeze-cmd-output`, 
`update-inlined-dockerfile-scripts`).
   
   ### Deliberately kept 3.10 references
   
   - `.github/actions/prepare_all_ci_images/action.yml` still restores a 3.10 
(and 3.9) CI image: the action is shared with release branches that still 
support those versions (see the comment in the file and #45268).
   - `ALL_HISTORICAL_PYTHON_VERSIONS`, `PYTHON_3_10_TO_3_14` and 
`ALL_PYTHON_VERSION_TO_PATCHLEVEL_VERSION["3.10"]` in `global_constants.py`: 
used to reason about older Airflow releases (SBOM, compatibility matrix) and to 
build images for release branches.
   - `python:3.10-slim-buster` in the Kubernetes decorator/pod operator tests 
and `python_version="3.10"` in the Vertex AI Ray hook: those are container/Ray 
runtime versions, not the Airflow interpreter.
   - Changelogs and `dev/breeze/doc/adr/0002-*.md` keep their historical 
wording.
   
   ### Checks run
   
   - `uv run --project dev/breeze pytest dev/breeze/tests` (1160 passed; 
`test_publish_docs_to_s3.py` skipped locally due to a botocore/Python 3.14 
import issue unrelated to this change).
   - `uv run --project scripts pytest scripts/tests` (1602 passed), `uv run 
--project dev/registry pytest dev/registry/tests` (271 passed).
   - Targeted task-sdk and shared/logging unit tests for the simplified code 
paths pass; the provider tests that lost their `skipif` markers need a DB and 
were not run locally.
   - `ruff check` / `ruff format` clean; `prek run --from-ref main --to-ref 
HEAD --stage pre-commit` - see the PR checks for the result on CI.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Fable 5.1)
   
   Generated-by: Claude Code (Fable 5.1) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to