diff --git a/tests/test_example_dags.py b/tests/test_example_dags.py index 41b967e92..11655a31d 100644 --- a/tests/test_example_dags.py +++ b/tests/test_example_dags.py @@ -1,7 +1,12 @@ from __future__ import annotations from pathlib import Path -from functools import cache + +try: + from functools import cache +except ImportError: + from functools import lru_cache as cache + import airflow import pytest diff --git a/tests/test_example_dags_no_connections.py b/tests/test_example_dags_no_connections.py index 97f39bf99..5356c4ea6 100644 --- a/tests/test_example_dags_no_connections.py +++ b/tests/test_example_dags_no_connections.py @@ -1,7 +1,11 @@ from __future__ import annotations from pathlib import Path -from functools import cache + +try: + from functools import cache +except ImportError: + from functools import lru_cache as cache import airflow import pytest