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

kaxilnaik pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-1-test by this push:
     new 73e77abfeab Move structlog imports into a TYPE_CHECKING block to untie 
version bumps (#57335)
73e77abfeab is described below

commit 73e77abfeab1398c27e12760c45ef116608d345a
Author: Amogh Desai <[email protected]>
AuthorDate: Mon Oct 27 16:43:24 2025 +0530

    Move structlog imports into a TYPE_CHECKING block to untie version bumps 
(#57335)
    
    (cherry picked from commit 08c317dd323a8b509c59fdfa65078fa8150bbbef)
---
 airflow-ctl/pyproject.toml                                     | 2 +-
 shared/logging/src/airflow_shared/logging/percent_formatter.py | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/airflow-ctl/pyproject.toml b/airflow-ctl/pyproject.toml
index c67967aeb09..bbfeffcd72d 100644
--- a/airflow-ctl/pyproject.toml
+++ b/airflow-ctl/pyproject.toml
@@ -35,7 +35,7 @@ dependencies = [
     "platformdirs>=4.3.6",
     "pydantic>=2.11.0", # https://github.com/apache/airflow/issues/56482
     "rich-argparse>=1.0.0",
-    "structlog>=25.2.0",
+    "structlog>=25.4.0",
     "uuid6>=2024.7.10",
     "tabulate>=0.9.0",
 ]
diff --git a/shared/logging/src/airflow_shared/logging/percent_formatter.py 
b/shared/logging/src/airflow_shared/logging/percent_formatter.py
index 33d566cf21e..b08024621e6 100644
--- a/shared/logging/src/airflow_shared/logging/percent_formatter.py
+++ b/shared/logging/src/airflow_shared/logging/percent_formatter.py
@@ -26,17 +26,20 @@ from io import StringIO
 from typing import TYPE_CHECKING, ClassVar
 
 import structlog.dev
-from structlog.dev import ConsoleRenderer, Styles
+from structlog.dev import ConsoleRenderer
 from structlog.processors import CallsiteParameter
 
 if TYPE_CHECKING:
+    from structlog.dev import ColumnStyles
     from structlog.typing import EventDict, WrappedLogger
 
 
 class _LazyLogRecordDict(collections.abc.Mapping):
     __slots__ = ("event", "styles", "level_styles", "method_name", "no_colors")
 
-    def __init__(self, event: EventDict, method_name: str, level_styles: 
dict[str, str], styles: Styles):
+    def __init__(
+        self, event: EventDict, method_name: str, level_styles: dict[str, 
str], styles: ColumnStyles
+    ):
         self.event = event
         self.method_name = method_name
         self.level_styles = level_styles

Reply via email to