Conversation
Python 3.10 reaches end of life in October 2026 and more and more of Airflow's dependencies have already dropped it, which makes the 3.10 constraint resolution the slowest and most fragile leg of CI. Moving the baseline to Python 3.11 also lets the code base drop the compat shims that only existed for 3.10: the ``tomli`` fallbacks for ``tomllib``, the ``typing_extensions`` imports of ``Self``, ``Unpack`` and ``assert_never``, the ``asyncio.Runner`` re-implementation in the task SDK, the PGP path for verifying the Python tarball in the images (3.11+ ships Sigstore bundles) and the ``timezone.utc`` spelling that ruff now rewrites to ``datetime.UTC``. Python 3.10 stays in the historical version lists that breeze uses to reason about older Airflow releases and release branches, and in the CI image restore action that release branches still rely on.
shahar1
force-pushed
the
drop-python-3-10
branch
from
October 3, 2026 12:19
e70a3e1 to
8822822
Compare
shahar1
force-pushed
the
drop-python-3-10
branch
from
October 3, 2026 12:24
8822822 to
265bc68
Compare
This was referenced Oct 3, 2026
Contributor
Author
|
Superseded by a stacked set of smaller PRs so each piece can be reviewed on its own (stack #74160):
The combined diff of the stack is identical to this PR (plus the newsfragment rename). Closing in favour of the stack. Drafted-by: Claude Code (Fable 5.1) (no human review before posting) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-whyworkaround infinalize-tests.yml, which this PR removes along with 3.10).What changes
requires-python = ">=3.11"and theProgramming Language :: Python :: 3.10classifier removed in everypyproject.toml(core, task-sdk, airflow-ctl, all providers,shared/*, dev/test distributions).uv.lockfiles regenerated.ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS/ALL_PYTHON_MAJOR_MINOR_VERSIONSare3.11–3.14; providers compatibility matrix runs on 3.11; the deadPYTHON_TO_MIN_AIRFLOW_MAPPINGconstant and its unusedis_airflow_version_supported_for_pythonhelper are removed.3.11in composite actions, workflows, devcontainer,Dockerfile/Dockerfile.ciandscripts/docker. The PGP branch for verifying the Python source tarball is removed (3.11+ ships Sigstore bundles); thepython-3.10.asckey and its entry inupdate_docker_gpg_keys.pygo with it.tomlifallbacks replaced bytomllib;typing_extensionsimports ofSelf/Unpack/assert_neverreplaced bytyping; theasyncio.Runnerre-implementation inBaseOperator.event_loop()removed;sys.version_info < (3, 11)test skips removed.tomlidropped frombuild-system.requiresand prek hook dependencies.timezone.utctodatetime.UTC(UP017) andUnpack[tuple[...]]to*tuple[...](UP044) across the repo - that is the bulk of the diff.UP042(str, Enum->StrEnum) andASYNC109become 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.# requires-python) inscripts/ci/prek/*.pyanddev/**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.ymlstill 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 Update ASF "stash" action to allow list of keys #45268).ALL_HISTORICAL_PYTHON_VERSIONS,PYTHON_3_10_TO_3_14andALL_PYTHON_VERSION_TO_PATCHLEVEL_VERSION["3.10"]inglobal_constants.py: used to reason about older Airflow releases (SBOM, compatibility matrix) and to build images for release branches.python:3.10-slim-busterin the Kubernetes decorator/pod operator tests andpython_version="3.10"in the Vertex AI Ray hook: those are container/Ray runtime versions, not the Airflow interpreter.dev/breeze/doc/adr/0002-*.mdkeep their historical wording.Checks run
uv run --project dev/breeze pytest dev/breeze/tests(1160 passed;test_publish_docs_to_s3.pyskipped 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).skipifmarkers need a DB and were not run locally.ruff check/ruff formatclean;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?
Generated-by: Claude Code (Fable 5.1) following the guidelines