This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 8295eb70a1 adding import error (#43275)
8295eb70a1 is described below

commit 8295eb70a12faa9ce4fa5cc27b6632c784eb1b5a
Author: Bowrna <[email protected]>
AuthorDate: Tue Oct 22 23:49:31 2024 +0530

    adding import error (#43275)
---
 dev/breeze/src/airflow_breeze/global_constants.py | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/dev/breeze/src/airflow_breeze/global_constants.py 
b/dev/breeze/src/airflow_breeze/global_constants.py
index 9700174640..3cc937f775 100644
--- a/dev/breeze/src/airflow_breeze/global_constants.py
+++ b/dev/breeze/src/airflow_breeze/global_constants.py
@@ -22,8 +22,22 @@ from __future__ import annotations
 
 import json
 import platform
+import sys
 from enum import Enum
-from functools import cache
+
+from airflow_breeze.utils.console import get_console
+
+try:
+    from functools import cache
+except ImportError:
+    get_console().print(
+        "\n[error]Breeze doesn't support Python version <=3.8\n\n"
+        "[warning]Use Python 3.9 and force reinstall breeze with pipx\n\n"
+        "     pipx install --force -e ./dev/breeze\n"
+        "\nTo find out more, visit [info]https://github.com/apache/airflow/";
+        "blob/main/dev/breeze/doc/01_installation.rst#the-pipx-tool[/]\n"
+    )
+    sys.exit(1)
 from pathlib import Path
 
 from airflow_breeze.utils.host_info_utils import Architecture

Reply via email to