Skip to content
Closed
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 .github/actions/install-pre-commit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ description: 'Installs pre-commit and related packages'
inputs:
python-version:
description: 'Python version to use'
default: "3.9"
default: "3.10"
uv-version:
description: 'uv version to use'
default: "0.7.16" # Keep this comment to allow automatic replacement of uv version
Expand Down
1 change: 1 addition & 0 deletions .github/actions/prepare_all_ci_images/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ runs:
# this should be implemented in stash action as list of keys to download.
# That includes 3.9 - 3.12 as we are backporting it to v3-0-test branch
# This is captured in https://github.com/apache/airflow/issues/45268
# So we actually need 3.9 even if 3.9 support on main is dropped!
- name: "Restore CI docker image ${{ inputs.platform }}:3.9"
uses: ./.github/actions/prepare_single_ci_image
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-docs-to-s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.actor }}
INCLUDE_SUCCESS_OUTPUTS: false
PYTHON_MAJOR_MINOR_VERSION: 3.9
PYTHON_MAJOR_MINOR_VERSION: 3.10
VERBOSE: "true"
EXTRA_BUILD_OPTIONS: ${{ needs.build-info.outputs.extra-build-options }}
steps:
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.actor }}
INCLUDE_SUCCESS_OUTPUTS: false
PYTHON_MAJOR_MINOR_VERSION: 3.9
PYTHON_MAJOR_MINOR_VERSION: 3.10
VERBOSE: "true"
steps:
- name: "Cleanup repo"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_dockerhub_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ on: # yamllint disable-line rule:truthy
default: false
limitPythonVersions:
type: string
description: 'Force python versions (e.g. "3.9 3.10")'
description: 'Force python versions (e.g. "3.10 3.11")'
default: ''
permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_single_dockerhub_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ on: # yamllint disable-line rule:truthy
type: string
required: true
pythonVersion:
description: 'Python version (e.g. 3.8, 3.9, 3.10, 3.11)'
description: 'Python version (e.g. 3.10, 3.11)'
type: string
required: true
skipLatest:
Expand Down
4 changes: 1 addition & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,7 @@ repos:
entry: ./scripts/ci/pre_commit/check_deferrable_default.py
pass_filenames: false
# libcst doesn't have source wheels for all PY except PY3.12, excluding it
# libcst 1.8.1 doesn't include typing-extensions which is needed for Python 3.9
additional_dependencies: ['libcst>=1.1.0,!=1.8.0,!=1.8.1']
additional_dependencies: ['libcst>=1.8.1']
files: ^(providers/.*/)?airflow/.*/(sensors|operators)/.*\.py$
- repo: https://github.com/asottile/blacken-docs
rev: 1.19.1
Expand All @@ -247,7 +246,6 @@ repos:
name: Run black on docs
args:
- --line-length=110
- --target-version=py39
- --target-version=py310
- --target-version=py311
- --target-version=py312
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ formats: []
sphinx:
configuration: devel-common/src/docs/rtd-deprecation/conf.py
python:
version: "3.9"
version: "3.10"
install:
- method: pip
path: .
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ how to set up the environment, run checks, build docs and follow the PR workflow

## Running tests

- [`03_contributors_quick_start.rst`](contributing-docs/03_contributors_quick_start.rst) shows running tests inside Breeze. Use `pytest` inside the container for individual files or invoke `breeze testing` commands to run full suites, e.g. `breeze --backend postgres --python 3.9 testing tests --test-type All`.
- [`03_contributors_quick_start.rst`](contributing-docs/03_contributors_quick_start.rst) shows running tests inside Breeze. Use `pytest` inside the container for individual files or invoke `breeze testing` commands to run full suites, e.g. `breeze --backend postgres --python 3.10 testing tests --test-type All`.

## Building documentation

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ chmod 1777 /tmp

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

PYTHON_MAJOR_MINOR_VERSION=${PYTHON_MAJOR_MINOR_VERSION:=3.9}
PYTHON_MAJOR_MINOR_VERSION=${PYTHON_MAJOR_MINOR_VERSION:=3.10}

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

Expand Down
6 changes: 3 additions & 3 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,15 @@ to avoid "works-for-me" syndrome, where you use different versions of dependenci
that are used in main CI tests and by other contributors.

There are different constraint files for different Python versions. For example, this command will install
all basic devel requirements and requirements of Google provider as last successfully tested for Python 3.9:
all basic devel requirements and requirements of Google provider as last successfully tested for Python 3.10:

uv pip install -e ".[devel,google]"" \
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-3.9.txt"
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-3.10.txt"

Using the 'constraints-no-providers' constraint files, you can upgrade Airflow without paying attention to the provider's dependencies. This allows you to keep installed provider dependencies and install the latest supported ones using pure Airflow core.

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

Note that you can also use `pip install` if you do not use `uv`.

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,14 @@ them to the appropriate format and workflow that your tool requires.

```bash
pip install 'apache-airflow==3.0.2' \
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-3.0.2/constraints-3.9.txt"
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-3.0.2/constraints-3.10.txt"
```

2. Installing with extras (i.e., postgres, google)

```bash
pip install 'apache-airflow[postgres,google]==3.0.2' \
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-3.0.2/constraints-3.9.txt"
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-3.0.2/constraints-3.10.txt"
```

For information on installing provider distributions, check
Expand Down Expand Up @@ -323,7 +323,7 @@ They are based on the official release schedule of Python and Kubernetes, nicely
1. We drop support for Python and Kubernetes versions when they reach EOL. Except for Kubernetes, a
version stays supported by Airflow if two major cloud providers still provide support for it. We drop
support for those EOL versions in main right after EOL date, and it is effectively removed when we release
the first new MINOR (Or MAJOR if there is no new MINOR version) of Airflow. For example, for Python 3.9 it
the first new MINOR (Or MAJOR if there is no new MINOR version) of Airflow. For example, for Python 3.10 it
means that we will drop support in main right after 27.06.2023, and the first MAJOR or MINOR version of
Airflow released after will not have it.

Expand Down
14 changes: 7 additions & 7 deletions airflow-core/docs/installation/installing-from-pypi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ You can create the URL to the file substituting the variables in the template be
where:

- ``AIRFLOW_VERSION`` - Airflow version (e.g. :subst-code:`|version|`) or ``main``, ``2-0``, for latest development version
- ``PYTHON_VERSION`` Python version e.g. ``3.9``, ``3.10``
- ``PYTHON_VERSION`` Python version e.g. ``3.10``, ``3.11``

The examples below assume that you want to use install Airflow in a reproducible way with the ``celery`` extra,
but you can pick your own set of extras and providers to install.
Expand Down Expand Up @@ -321,9 +321,9 @@ dependencies compatible with just Airflow core at the moment Airflow was release

AIRFLOW_VERSION=|version|
PYTHON_VERSION="$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')"
# For example: 3.9
# For example: 3.10
CONSTRAINT_URL="https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-no-providers-${PYTHON_VERSION}.txt"
# For example: https://raw.githubusercontent.com/apache/airflow/constraints-|version|/constraints-no-providers-3.9.txt
# For example: https://raw.githubusercontent.com/apache/airflow/constraints-|version|/constraints-no-providers-3.10.txt
pip install "apache-airflow==${AIRFLOW_VERSION}" --constraint "${CONSTRAINT_URL}"

Troubleshooting
Expand All @@ -347,7 +347,7 @@ Symbol not found: ``_Py_GetArgcArgv``
=====================================

If you see ``Symbol not found: _Py_GetArgcArgv`` while starting or importing ``airflow``, this may mean that you are using an incompatible version of Python.
For a homebrew installed version of Python, this is generally caused by using Python in ``/usr/local/opt/bin`` rather than the Frameworks installation (e.g. for ``python 3.9``: ``/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9``).
For a homebrew installed version of Python, this is generally caused by using Python in ``/usr/local/opt/bin`` rather than the Frameworks installation (e.g. for ``python 3.10``: ``/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10``).

The crux of the issue is that a library Airflow depends on, ``setproctitle``, uses a non-public Python API
which is not available from the standard installation ``/usr/local/opt/`` (which symlinks to a path under ``/usr/local/Cellar``).
Expand All @@ -356,9 +356,9 @@ An easy fix is just to ensure you use a version of Python that has a dylib of th

.. code-block:: bash

# Note: these instructions are for python3.9 but can be loosely modified for other versions
brew install python@3.9
virtualenv -p /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/bin/python3 .toy-venv
# Note: these instructions are for python3.10 but can be loosely modified for other versions
brew install python@3.10
virtualenv -p /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/bin/python3 .toy-venv
source .toy-venv/bin/activate
pip install apache-airflow
python
Expand Down
2 changes: 1 addition & 1 deletion airflow-core/docs/installation/prerequisites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Prerequisites

Airflow® is tested with:

* Python: 3.9, 3.10, 3.11, 3.12
* Python: 3.10, 3.11, 3.12

* Databases:

Expand Down
2 changes: 1 addition & 1 deletion airflow-core/docs/installation/upgrading_to_airflow3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Step 1: Take care of prerequisites
----------------------------------

- Make sure that you are on Airflow 2.7 or later. It is recommended to upgrade to latest 2.x and then to Airflow 3.
- Make sure that your Python version is in the supported list. Airflow 3.0.0 supports the following Python versions: Python 3.9, 3.10, 3.11 and 3.12.
- Make sure that your Python version is in the supported list. Airflow 3.0.0 supports the following Python versions: Python 3.10, 3.11 and 3.12.
- Ensure that you are not using any features or functionality that have been :ref:`removed in Airflow 3<breaking-changes>`.


Expand Down
2 changes: 1 addition & 1 deletion airflow-core/docs/start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This quick start guide will help you bootstrap an Airflow standalone instance on

.. note::

Successful installation requires a Python 3 environment. Starting with Airflow 2.7.0, Airflow supports Python 3.9, 3.10, 3.11, and 3.12.
Successful installation requires a Python 3 environment. Starting with Airflow 2.7.0, Airflow supports Python 3.10, 3.11, and 3.12.

Officially supported installation methods is with``pip`.

Expand Down
3 changes: 1 addition & 2 deletions airflow-core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ name = "apache-airflow-core"
description = "Core packages for Apache Airflow, schedule and API server"
readme = { file = "README.md", content-type = "text/markdown" }
license-files.globs = ["LICENSE", "3rd-party-licenses/*.txt", "NOTICE"]
requires-python = "~=3.9,<3.13"
requires-python = "~=3.10,<3.13"
authors = [
{ name = "Apache Software Foundation", email = "dev@airflow.apache.org" },
]
Expand All @@ -51,7 +51,6 @@ classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ConnectionResponse(BaseModel):
def redact_password(cls, v: str | None, field_info: ValidationInfo) -> str | None:
if v is None:
return None
return redact(v, field_info.field_name)
return str(redact(v, field_info.field_name))

@field_validator("extra", mode="before")
@classmethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def redact_val(self) -> Self:
return self
except json.JSONDecodeError:
# value is not a serialized string representation of a dict.
self.val = redact(self.val, self.key)
self.val = str(redact(self.val, self.key))
return self


Expand Down
2 changes: 1 addition & 1 deletion airflow-ctl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ A command-line tool for interacting with Apache Airflow instances through the Ai

## Requirements

- Python 3.9 or later (compatible with Python >= 3.9 and < 3.13)
- Python 3.10 or later (compatible with Python >= 3.10 and < 3.13)
- Network access to an Apache Airflow instance with REST API enabled
- Keyring backend installed in operating system for secure token storage

Expand Down
2 changes: 1 addition & 1 deletion airflow-ctl/docs/installation/installing-from-pypi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ You can create the URL to the file substituting the variables in the template be
where:

- ``AIRFLOW_CTL_VERSION`` - Airflow CTL version (e.g. :subst-code:`|version|`) or ``main``, ``2-0``, for latest development version
- ``PYTHON_VERSION`` Python version e.g. ``3.9``, ``3.10``
- ``PYTHON_VERSION`` Python version e.g. ``3.10``, ``3.11``


Verifying installed dependencies
Expand Down
7 changes: 3 additions & 4 deletions airflow-ctl/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ name = "apache-airflow-ctl"
dynamic = ["version"]
description = "Apache Airflow command line tool for communicating with an Apache Airflow, using the API."
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.9, <3.13"
requires-python = ">=3.10, <3.13"
dependencies = [
# TODO there could be still missing deps such as airflow-core
"argcomplete>=1.10",
Expand All @@ -33,7 +33,6 @@ dependencies = [
"rich-argparse>=1.0.0",
"structlog>=25.2.0",
"uuid6>=2024.7.10",
"eval-type-backport>=0.2.0; python_version == '3.9'",
]

classifiers = [
Expand Down Expand Up @@ -130,14 +129,14 @@ enum-field-as-literal='one' # When a single enum member, make it output a `Liter
input-file-type='openapi'
output-model-type='pydantic_v2.BaseModel'
output-datetime-class='datetime'
target-python-version='3.9'
target-python-version='3.10'
use-annotated=true
use-default=true
use-double-quotes=true
use-schema-description=true # Desc becomes class doc comment
use-standard-collections=true # list[] not List[]
use-subclass-enum=true # enum, not union of Literals
use-union-operator=true # 3.9+annotations, not `Union[]`
use-union-operator=true # +annotations, not `Union[]`

input = "../airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml"
output = "src/airflowctl/api/datamodels/generated.py"
Expand Down
4 changes: 2 additions & 2 deletions airflow-ctl/src/airflowctl/api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
import json
import os
import sys
from collections.abc import Callable
from functools import wraps
from typing import TYPE_CHECKING, Any, Callable, Literal, TypeVar, cast
from typing import TYPE_CHECKING, Any, Literal, ParamSpec, TypeVar, cast

import httpx
import keyring
Expand Down Expand Up @@ -53,7 +54,6 @@
AirflowCtlException,
AirflowCtlNotFoundException,
)
from airflowctl.typing_compat import ParamSpec

if TYPE_CHECKING:
# # methodtools doesn't have typestubs, so give a stub
Expand Down
6 changes: 3 additions & 3 deletions airflow-ctl/src/airflowctl/ctl/cli_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
import os
import textwrap
from argparse import Namespace
from collections.abc import Iterable
from collections.abc import Callable, Iterable
from functools import partial
from pathlib import Path
from typing import Any, Callable, NamedTuple, Union
from typing import Any, NamedTuple

import rich

Expand Down Expand Up @@ -330,7 +330,7 @@ def from_group_command(cls, group_command: GroupCommand) -> GroupCommandParser:
)


CLICommand = Union[ActionCommand, GroupCommand, GroupCommandParser]
CLICommand = ActionCommand | GroupCommand | GroupCommandParser


class CommandFactory:
Expand Down
29 changes: 0 additions & 29 deletions airflow-ctl/src/airflowctl/typing_compat.py

This file was deleted.

4 changes: 2 additions & 2 deletions airflow-ctl/src/airflowctl/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
from __future__ import annotations

import itertools
from collections.abc import Iterable
from typing import Callable, TypeVar
from collections.abc import Callable, Iterable
from typing import TypeVar

T = TypeVar("T")

Expand Down
1 change: 0 additions & 1 deletion chart/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand Down
Loading
Loading