From 5ba267e17e62bdb706e6b13798a3154c85584578 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Fri, 9 Aug 2024 09:53:03 -0700 Subject: [PATCH] Replace use of toExpandedPipeline in dotTools This package will be deprecated shortly. --- python/lsst/ctrl/mpexec/dotTools.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/python/lsst/ctrl/mpexec/dotTools.py b/python/lsst/ctrl/mpexec/dotTools.py index a55d2ca0..a28eefd7 100644 --- a/python/lsst/ctrl/mpexec/dotTools.py +++ b/python/lsst/ctrl/mpexec/dotTools.py @@ -39,7 +39,6 @@ import html import io import re -import warnings from collections.abc import Iterable from typing import TYPE_CHECKING, Any @@ -282,10 +281,8 @@ def expand_dimensions(connection: connectionTypes.BaseConnection) -> list[str]: allDatasets: set[str | tuple[str, str]] = set() if isinstance(pipeline, Pipeline): # TODO: DM-40639 will rewrite this code and finish off the deprecation - # of toExpandedPipeline. - with warnings.catch_warnings(): - warnings.simplefilter("ignore", category=FutureWarning) - pipeline = pipeline.toExpandedPipeline() + # of toExpandedPipeline but for now use the compatibility API. + pipeline = pipeline.to_graph()._iter_task_defs() # The next two lines are a workaround until DM-29658 at which time metadata # connections should start working with the above code