Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ chmod 1777 /tmp

AIRFLOW_SOURCES=$(cd "${IN_CONTAINER_DIR}/../.." || exit 1; pwd)

PYTHON_MAJOR_MINOR_VERSION=${PYTHON_MAJOR_MINOR_VERSION:=3.8}
PYTHON_MAJOR_MINOR_VERSION=${PYTHON_MAJOR_MINOR_VERSION:=3.9}

export AIRFLOW_HOME=${AIRFLOW_HOME:=${HOME}}

Expand Down
2 changes: 1 addition & 1 deletion clients/python/test_python_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
# PEP 723 compliant inline script metadata (not yet widely supported)
# /// script
# requires-python = ">=3.8"
# requires-python = ">=3.9"
# dependencies = [
# "apache-airflow-client",
# "rich",
Expand Down
10 changes: 5 additions & 5 deletions contributing-docs/12_airflow_dependencies_and_extras.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ from the PyPI package:

.. code-block:: bash

pip install "apache-airflow[google,amazon,async]==2.2.5" \
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.2.5/constraints-3.8.txt"
pip install "apache-airflow[google,amazon,async]==2.11.0." \
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.11.0./constraints-3.9.txt"

The last one can be used to install Airflow in "minimal" mode - i.e when bare Airflow is installed without
extras.
Expand All @@ -98,15 +98,15 @@ requirements).
.. code-block:: bash

pip install -e ".[devel]" \
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-source-providers-3.8.txt"
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-source-providers-3.9.txt"


This also works with extras - for example:

.. code-block:: bash

pip install ".[ssh]" \
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-source-providers-3.8.txt"
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-source-providers-3.9.txt"


There are different set of fixed constraint files for different python major/minor versions and you should
Expand All @@ -118,7 +118,7 @@ using ``constraints-no-providers`` constraint files as well.
.. code-block:: bash

pip install . --upgrade \
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-no-providers-3.8.txt"
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-no-providers-3.9.txt"


The ``constraints-<PYTHON_MAJOR_MINOR_VERSION>.txt`` and ``constraints-no-providers-<PYTHON_MAJOR_MINOR_VERSION>.txt``
Expand Down
2 changes: 1 addition & 1 deletion dev/README_RELEASE_AIRFLOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ Optionally it can be followed with constraints

```shell script
pip install apache-airflow==<VERSION>rc<X> \
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-<VERSION>/constraints-3.8.txt"`
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-<VERSION>/constraints-3.9.txt"`
```

Note that the constraints contain python version that you are installing it with.
Expand Down
2 changes: 1 addition & 1 deletion dev/breeze/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,6 @@ PLEASE DO NOT MODIFY THE HASH BELOW! IT IS AUTOMATICALLY UPDATED BY PRE-COMMIT.

---------------------------------------------------------------------------------------------------------

Package config hash: 8ffea3f340132c8cbe5c5ee29e95563ba0bcb91aabf5ae792e6ac99326108abeb1e0d2c281c444a136c73557f4d1bbb00a6b41f1bf406f6cb2f23f48ffda7424
Package config hash: b3fa7a0a91cc5be74352789e326e72ef2bbe1c63f2b49b59d763a9c4eb8a218e39526a45fbd0d36c9ef9f18a1d3e166305273f32742f3f432342ae7ec506f94a

---------------------------------------------------------------------------------------------------------
1 change: 0 additions & 1 deletion dev/breeze/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ classifiers = [
"Intended Audience :: Developers",
"Framework :: Apache Airflow",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down
2 changes: 1 addition & 1 deletion dev/breeze/tests/test_run_test_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_primary_test_arg_is_excluded_by_extra_pytest_arg(mock_run_command):
test_type=f"Providers[{test_provider},{test_provider_not_skipped}]",
),
extra_pytest_args=(f"--ignore=tests/providers/{test_provider}",),
python_version="3.8",
python_version="3.9",
output=None,
test_timeout=60,
skip_docker_compose_down=True,
Expand Down
2 changes: 1 addition & 1 deletion dev/check_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"""

AIRFLOW_DOCKER = """\
FROM python:3.8
FROM python:3.9

# Upgrade
RUN pip install "apache-airflow=={}"
Expand Down
2 changes: 1 addition & 1 deletion docker_tests/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@

SOURCE_ROOT = Path(__file__).resolve().parents[1]

DEFAULT_PYTHON_MAJOR_MINOR_VERSION = "3.8"
DEFAULT_PYTHON_MAJOR_MINOR_VERSION = "3.9"
DEFAULT_DOCKER_IMAGE = f"ghcr.io/apache/airflow/main/prod/python{DEFAULT_PYTHON_MAJOR_MINOR_VERSION}:latest"
DOCKER_IMAGE = os.environ.get("DOCKER_IMAGE") or DEFAULT_DOCKER_IMAGE
2 changes: 1 addition & 1 deletion kubernetes_tests/test_kubernetes_pod_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@ def __getattr__(self, name):
task = KubernetesPodOperator(
task_id="dry_run_demo",
name="hello-dry-run",
image="python:3.8-slim-buster",
image="python:3.9-slim-buster",
cmds=["printenv"],
env_vars=[
V1EnvVar(name="password", value="{{ password }}"),
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci/docker-compose/devcontainer.env
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
# specific language governing permissions and limitations
# under the License.
HOME=
AIRFLOW_CI_IMAGE="ghcr.io/apache/airflow/main/ci/python3.8:latest"
AIRFLOW_CI_IMAGE="ghcr.io/apache/airflow/main/ci/python3.9:latest"
ANSWER=
AIRFLOW_ENV="development"
PYTHON_MAJOR_MINOR_VERSION="3.8"
PYTHON_MAJOR_MINOR_VERSION="3.9"
AIRFLOW_EXTRAS=
BASE_BRANCH="main"
BREEZE="true"
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/docker-compose/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
airflow:
stdin_open: true # docker run -i
tty: true # docker run -t
image: ghcr.io/apache/airflow/main/ci/python3.8
image: ghcr.io/apache/airflow/main/ci/python3.9
env_file: devcontainer.env
ports:
- "22:22"
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/pre_commit/mypy.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@
"[yellow]If you see strange stacktraces above, and can't reproduce it, please run"
" this command and try again:\n"
)
console.print(f"breeze ci-image build --python 3.8{flag}\n")
console.print(f"breeze ci-image build --python 3.9{flag}\n")
console.print("[yellow]You can also run `breeze down --cleanup-mypy-cache` to clean up the cache used.\n")
sys.exit(res.returncode)
2 changes: 1 addition & 1 deletion scripts/ci/pre_commit/mypy_folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@
"[yellow]If you see strange stacktraces above, and can't reproduce it, please run"
" this command and try again:\n"
)
console.print(f"breeze ci-image build --python 3.8{flag}\n")
console.print(f"breeze ci-image build --python 3.9{flag}\n")
console.print("[yellow]You can also run `breeze down --cleanup-mypy-cache` to clean up the cache used.\n")
sys.exit(res.returncode)
2 changes: 1 addition & 1 deletion scripts/docker/entrypoint_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ chmod 1777 /tmp

AIRFLOW_SOURCES=$(cd "${IN_CONTAINER_DIR}/../.." || exit 1; pwd)

PYTHON_MAJOR_MINOR_VERSION=${PYTHON_MAJOR_MINOR_VERSION:=3.8}
PYTHON_MAJOR_MINOR_VERSION=${PYTHON_MAJOR_MINOR_VERSION:=3.9}

export AIRFLOW_HOME=${AIRFLOW_HOME:=${HOME}}

Expand Down
2 changes: 1 addition & 1 deletion scripts/in_container/install_airflow_and_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def find_installation_spec(
)
@click.option(
"--python-version",
default="3.8",
default="3.9",
envvar="PYTHON_MAJOR_MINOR_VERSION",
show_default=True,
help="Python version to use",
Expand Down
4 changes: 2 additions & 2 deletions scripts/in_container/run_generate_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
AIRFLOW_SOURCE_DIR = Path(__file__).resolve().parents[2]

DEFAULT_BRANCH = os.environ.get("DEFAULT_BRANCH", "main")
PYTHON_VERSION = os.environ.get("PYTHON_MAJOR_MINOR_VERSION", "3.8")
PYTHON_VERSION = os.environ.get("PYTHON_MAJOR_MINOR_VERSION", "3.9")
GENERATED_PROVIDER_DEPENDENCIES_FILE = AIRFLOW_SOURCE_DIR / "generated" / "provider_dependencies.json"

ALL_PROVIDER_DEPENDENCIES = json.loads(GENERATED_PROVIDER_DEPENDENCIES_FILE.read_text())
Expand Down Expand Up @@ -83,7 +83,7 @@
# commands that might change the installed version of apache-airflow should include "apache-airflow==X.Y.Z"
# in the list of install targets to prevent Airflow accidental upgrade or downgrade.
#
# Typical installation process of airflow for Python 3.8 is (with random selection of extras and custom
# Typical installation process of airflow for Python 3.9 is (with random selection of extras and custom
# dependencies added), usually consists of two steps:
#
# 1. Reproducible installation of airflow with selected providers (note constraints are used):
Expand Down
2 changes: 1 addition & 1 deletion tests/providers/google/cloud/operators/test_mlengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,7 @@ def test_templating(self, create_task_instance_of_operator, session):
TEST_GCP_PROJECT_ID = "test-project"
TEST_REGION = "us-central1"
TEST_RUNTIME_VERSION = "1.15"
TEST_PYTHON_VERSION = "3.8"
TEST_PYTHON_VERSION = "3.9"
TEST_JOB_DIR = "gs://example_mlengine_bucket/job-dir"
TEST_PACKAGE_URIS = ["gs://system-tests-resources/example_gcp_mlengine/trainer-0.1.tar.gz"]
TEST_TRAINING_PYTHON_MODULE = "trainer.task"
Expand Down
2 changes: 1 addition & 1 deletion tests/providers/google/cloud/triggers/test_mlengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
TEST_GCP_PROJECT_ID = "test-project"
TEST_REGION = "us-central1"
TEST_RUNTIME_VERSION = "1.15"
TEST_PYTHON_VERSION = "3.8"
TEST_PYTHON_VERSION = "3.9"
TEST_JOB_DIR = "gs://example_mlengine_bucket/job-dir"
TEST_PACKAGE_URIS = ["gs://system-tests-resources/example_gcp_mlengine/trainer-0.1.tar.gz"]
TEST_TRAINING_PYTHON_MODULE = "trainer.task"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
) as dag:
# [START howto_operator_kubernetes]
@task.kubernetes(
image="python:3.8-slim-buster",
image="python:3.9-slim-buster",
name="k8s_test",
namespace="default",
in_cluster=False,
Expand All @@ -43,7 +43,7 @@ def execute_in_k8s_pod():
print("Hello from k8s pod")
time.sleep(2)

@task.kubernetes(image="python:3.8-slim-buster", namespace="default", in_cluster=False)
@task.kubernetes(image="python:3.9-slim-buster", namespace="default", in_cluster=False)
def print_pattern():
n = 5
for i in range(n):
Expand Down