Skip to content

Exclude every Python 3.15 release in requires-python, not only 3.15.0 - #77947

Open
vatsrahul1001 wants to merge 4 commits into
mainfrom
fix-requires-python-3-15-wildcard
Open

vatsrahul1001 wants to merge 4 commits into
mainfrom
fix-requires-python-3-15-wildcard

Conversation

@vatsrahul1001

Copy link
Copy Markdown
Contributor

closes: #77851

requires-python = ">=3.11,!=3.15" only excludes Python 3.15.0. Under PEP 440 !=3.15 is !=3.15.0 (the release segment is zero-padded), so pip and uv accept Airflow on 3.15.1 and later, although the comment next to the setting says the next Python version is excluded until it is tested:

>=3.11,!=3.15    3.15.0 False   3.15.1 True    3.15.2 True
>=3.11,!=3.15.*  3.15.0 False   3.15.1 False   3.15.2 False

This changes the 18 hand-written requires-python lines in the workspace pyproject.toml files, including apache-airflow, apache-airflow-core, apache-airflow-task-sdk, apache-airflow-ctl and the Python client template, to !=3.15.*. Providers already use the wildcard form, since breeze generates !=<version>.* for them.

It also adds test_requires_python_excludes_whole_minor_versions to test_project_structure.py. It parses the workspace and provider pyproject.toml files and fails for any !=X.Y exclusion without the wildcard, so excluding the next Python version later doesn't bring this back. I checked that it fails on the old !=3.15 value and passes on the new one.

Releases that are already on PyPI keep their metadata, so this only affects new releases. Needs a backport to v3-4-test for 3.4.1.

Verified locally: the new test fails with !=3.15 in task-sdk/pyproject.toml and passes with !=3.15.*, uv lock --check still resolves, and the pre-commit hooks pass.


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

Generated-by: Claude Code

🤖 Generated with Claude Code

Under PEP 440, "!=3.15" is "!=3.15.0": the release segment is zero-padded, so
only Python 3.15.0 was excluded and installers accepted Airflow on 3.15.1 and
later. Use "!=3.15.*", as the generated provider metadata already does.

Add a test that fails for any "!=X.Y" exclusion in the workspace and provider
pyproject.toml files, so the next excluded version does not repeat this.

closes: #77851

Co-Authored-By: Claude <noreply@anthropic.com>
@potiuk
potiuk enabled auto-merge (squash) December 2, 2026 11:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The regression test omits clients/python/pyproject.toml, so reverting the client distribution’s Python-version exclusion would go undetected.

1 open issue
What changed in this PR

Corrects Python eligibility metadata so new Airflow releases reject every Python 3.15 patch release, addressing #77851.

Changes:

  • Updates 18 requires-python declarations to use !=3.15.*.
  • Adds a regression check for minor-version exclusions missing wildcards.
File Description
task-sdk/​pyproject.toml Updates Task SDK exclusion.
task-sdk-integration-tests/​pyproject.toml Updates SDK integration-test exclusion.
scripts/​pyproject.toml Updates scripts exclusion.
pyproject.toml Updates Airflow distribution exclusion.
providers-summary-docs/​pyproject.toml Updates provider documentation exclusion.
performance/​pyproject.toml Updates performance utilities exclusion.
kubernetes-tests/​pyproject.toml Updates Kubernetes test exclusion.
docker-tests/​pyproject.toml Updates Docker test exclusion.
docker-stack-docs/​pyproject.toml Updates Docker documentation exclusion.
dev/​pyproject.toml Updates development tools exclusion.
dev/​mypy/​pyproject.toml Updates mypy plugins exclusion.
dev/​breeze/​pyproject.toml Updates Breeze exclusion.
clients/​python/​pyproject.toml Updates Python client template exclusion.
chart/​pyproject.toml Updates chart documentation exclusion.
airflow-e2e-tests/​pyproject.toml Updates end-to-end test exclusion.
airflow-ctl/​pyproject.toml Updates management CLI exclusion.
airflow-ctl-tests/​pyproject.toml Updates management CLI test exclusion.
airflow-core/​tests/​unit/​always/​test_project_structure.py Adds exclusion syntax regression coverage.
airflow-core/​pyproject.toml Updates core distribution exclusion.

Review effort: Balanced

clients/python/pyproject.toml is two levels deep, so the existing patterns did
not match it and reverting its exclusion to "!=3.15" would have passed.

Co-Authored-By: Claude <noreply@anthropic.com>

@eladkal eladkal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

gremlinpython 3.8.3 supports Python 3.14 and 3.15, so the provider no
longer needs to be excluded from 3.14. The exclusion also made uv reject
3.14 for the whole workspace once any member used a wildcard such as
!=3.15.*.

- drop excluded-python-versions from provider.yaml and the generated
  !=3.14.* requires-python
- require gremlinpython>=3.8.3
- drop the python_version != "3.14" guard from the tinkerpop extras
- pin gremlinpython's exclude-newer cutoff so uv locks 3.8.3 rather
  than the 4.0.0b3 beta while 3.8.3 is inside the cooldown window

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

⚠️ 2 job(s) of attempt 1 were stopped because AWS reclaimed their EC2 Spot instances. These are not test failures.

RunsOn re-runs them automatically when the run finishes; no action is needed.

No provider is excluded from any Python version now that the Apache
Tinkerpop provider supports Python 3.14.

Co-Authored-By: Claude <noreply@anthropic.com>

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Requires-Python "!=3.15" excludes only Python 3.15.0, so pip and uv accept Airflow 3.4.0 on Python 3.15.1 and later

4 participants