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