Skip to content

Commit 1b87286

Browse files
potiukkaxil
authored andcommitted
Remove upper-binding for "python-requires" (#52980) (#52984)
Follow up after #52967 -> from later discussions it turned out that it's not really the ~= that is wrong and ambiguous, but that just upper-binding of Python version is generally considered as a bad idea - and it's not Astral's view but it's general consensus that upper-binding of "python-requires" is bad. Since ~= implies upper-binding, simply replacing it with >= is likely the best option we can choose. (cherry picked from commit e9eb481)
1 parent b494abd commit 1b87286

File tree

216 files changed

+446
-457
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+446
-457
lines changed

airflow-core/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ name = "apache-airflow-core"
3535
description = "Core packages for Apache Airflow, schedule and API server"
3636
readme = { file = "README.md", content-type = "text/markdown" }
3737
license-files.globs = ["LICENSE", "3rd-party-licenses/*.txt", "NOTICE"]
38-
requires-python = "~=3.9,<3.13"
38+
requires-python = ">=3.9,!=3.13"
3939
authors = [
4040
{ name = "Apache Software Foundation", email = "[email protected]" },
4141
]

airflow-ctl/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ name = "apache-airflow-ctl"
2020
dynamic = ["version"]
2121
description = "Apache Airflow command line tool for communicating with an Apache Airflow, using the API."
2222
readme = { file = "README.md", content-type = "text/markdown" }
23-
requires-python = ">=3.9, <3.13"
23+
requires-python = ">=3.9, !=3.13"
2424
dependencies = [
2525
# TODO there could be still missing deps such as airflow-core
2626
"argcomplete>=1.10",

chart/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ build-backend = "hatchling.build"
2424
[project]
2525
name = "apache-airflow-helm-chart"
2626
description = "Programmatically author, schedule and monitor data pipelines"
27-
requires-python = "~=3.9,<3.13"
27+
requires-python = ">=3.9,!=3.13"
2828
authors = [
2929
{ name = "Apache Software Foundation", email = "[email protected]" },
3030
]

clients/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dynamic = ["version"]
2525
description = "Apache Airflow API (Stable)"
2626
readme = "README.md"
2727
license-files.globs = ["LICENSE", "NOTICE"]
28-
requires-python = "~=3.9"
28+
requires-python = ">=3.9"
2929
authors = [
3030
{ name = "Apache Software Foundation", email = "[email protected]" },
3131
]

dev/breeze/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,6 @@ PLEASE DO NOT MODIFY THE HASH BELOW! IT IS AUTOMATICALLY UPDATED BY PRE-COMMIT.
135135

136136
---------------------------------------------------------------------------------------------------------
137137

138-
Package config hash: 63f150c89cf47e8a20a044eb3b80cbd900900c11b2c40c2d0c3e70c92b7ca6c003cbde7974901b677410844b209b3eb1c09008b76ea6b8359f606c5a64164d1f
138+
Package config hash: 45d0d735430fd1c151071f8ce20ac90b65d5bdc4317678ce1a03004a9f0853745a7b8cbf70520fc55afac15f742e961eeb7f5ffbf948f1b230f5cba788fceb65
139139

140140
---------------------------------------------------------------------------------------------------------

dev/breeze/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ classifiers = [
4141
"Programming Language :: Python :: 3.11",
4242
"Programming Language :: Python :: 3.12",
4343
]
44-
requires-python = "~=3.9"
44+
requires-python = ">=3.9"
4545

4646
dependencies = [
4747
"black>=23.11.0",

dev/breeze/src/airflow_breeze/utils/packages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ def get_min_airflow_version(provider_id: str) -> str:
592592

593593

594594
def get_python_requires(provider_id: str) -> str:
595-
python_requires = "~=3.9"
595+
python_requires = ">=3.9"
596596
provider_details = get_provider_details(provider_id=provider_id)
597597
for p in provider_details.excluded_python_versions:
598598
python_requires += f", !={p}"
@@ -646,7 +646,7 @@ def get_provider_jinja_context(
646646
cross_providers_dependencies = get_cross_provider_dependent_packages(provider_id=provider_id)
647647

648648
# Most providers require the same python versions, but some may have exclusions
649-
requires_python_version: str = f"~={DEFAULT_PYTHON_MAJOR_MINOR_VERSION}"
649+
requires_python_version: str = f">={DEFAULT_PYTHON_MAJOR_MINOR_VERSION}"
650650
for excluded_python_version in provider_details.excluded_python_versions:
651651
requires_python_version += f",!={excluded_python_version}"
652652

dev/breeze/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ description = "Development tools for Apache Airflow"
2626
classifiers = [
2727
"Private :: Do Not Upload",
2828
]
29-
requires-python = "~=3.9,<3.13"
29+
requires-python = ">=3.9,!=3.13"
3030
authors = [
3131
{ name = "Apache Software Foundation", email = "[email protected]" },
3232
]

docker-stack-docs/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ build-backend = "hatchling.build"
2424
[project]
2525
name = "apache-airflow-docker-stack"
2626
description = "Programmatically author, schedule and monitor data pipelines"
27-
requires-python = "~=3.9,<3.13"
27+
requires-python = ">=3.9,!=3.13"
2828
authors = [
2929
{ name = "Apache Software Foundation", email = "[email protected]" },
3030
]

0 commit comments

Comments
 (0)