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

shunping pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 8cc26a4be1f fix circular PipelineGraph import (#37134)
8cc26a4be1f is described below

commit 8cc26a4be1fc54810a0e59afe65a7fcc671ef3c3
Author: Derrick Williams <[email protected]>
AuthorDate: Wed Dec 17 16:14:44 2025 -0500

    fix circular PipelineGraph import (#37134)
    
    * move import
    
    * fix pylint
---
 sdks/python/apache_beam/runners/interactive/recording_manager.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sdks/python/apache_beam/runners/interactive/recording_manager.py 
b/sdks/python/apache_beam/runners/interactive/recording_manager.py
index c19b60b64fd..688d71bada2 100644
--- a/sdks/python/apache_beam/runners/interactive/recording_manager.py
+++ b/sdks/python/apache_beam/runners/interactive/recording_manager.py
@@ -41,7 +41,6 @@ from apache_beam.runners.interactive import 
interactive_runner as ir
 from apache_beam.runners.interactive import pipeline_fragment as pf
 from apache_beam.runners.interactive import utils
 from apache_beam.runners.interactive.caching.cacheable import CacheKey
-from apache_beam.runners.interactive.display.pipeline_graph import 
PipelineGraph
 from apache_beam.runners.interactive.options import capture_control
 from apache_beam.runners.runner import PipelineState
 
@@ -713,6 +712,10 @@ class RecordingManager:
     """Lazily initializes and returns the PipelineGraph."""
     if self._pipeline_graph is None:
       try:
+        # Allow initial module loading to be complete and not have a circular
+        # import.
+        from apache_beam.runners.interactive.display.pipeline_graph import 
PipelineGraph
+
         # Try to create the graph.
         self._pipeline_graph = PipelineGraph(self.user_pipeline)
       except (ImportError, NameError, AttributeError):

Reply via email to