From 4084abdcb4a0548d831008e49570f7659300acb6 Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Wed, 11 Jun 2025 15:19:13 +0800 Subject: [PATCH 1/2] build(pre-commit): ignore 1.8.1 as it misses typing-extensions which is needed in Python 3.9 --- .pre-commit-config.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0c39dedd35216..806cae6bbe9c0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -240,7 +240,8 @@ 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 - additional_dependencies: ['libcst>=1.1.0,!=1.8.0'] + # 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'] files: ^(providers/.*/)?airflow/.*/(sensors|operators)/.*\.py$ - repo: https://github.com/asottile/blacken-docs rev: 1.19.1 From 78f8adc25ef8d6ff8470e37e8ee747fe0280aff2 Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Wed, 11 Jun 2025 15:20:44 +0800 Subject: [PATCH 2/2] build(pyproject.toml): include libcst==1.8.1 for python 3.9 as it misses typing-extentions --- airflow-core/pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airflow-core/pyproject.toml b/airflow-core/pyproject.toml index 23f2afa64445c..f3da2beadda09 100644 --- a/airflow-core/pyproject.toml +++ b/airflow-core/pyproject.toml @@ -95,7 +95,8 @@ dependencies = [ "jinja2>=3.1.5", "jsonschema>=4.19.1", "lazy-object-proxy>=1.2.0", - "libcst >=1.1.0", + 'libcst >=1.1.0,!=1.8.1;python_version<"3.10"', + 'libcst >=1.1.0;python_version>="3.10"', "linkify-it-py>=2.0.0", "lockfile>=0.12.2", "methodtools>=0.4.7",