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 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