From 900ba7e9657c9a9858b06537465b264e1e77e9b4 Mon Sep 17 00:00:00 2001 From: claudevdm <33973061+claudevdm@users.noreply.github.com> Date: Mon, 9 Mar 2026 18:20:27 -0400 Subject: [PATCH] =?UTF-8?q?Revert=20"fix(python):=20Register=20all=20outpu?= =?UTF-8?q?t=20pcollections=20of=20a=20transform=20rather=20t=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 6a1618eca88ec88b9ebcb17336b39ae37d8ee500. --- sdks/python/apache_beam/pipeline.py | 5 ++--- sdks/python/apache_beam/pipeline_test.py | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/sdks/python/apache_beam/pipeline.py b/sdks/python/apache_beam/pipeline.py index 7446f9df38c9..3cce2c5bb773 100644 --- a/sdks/python/apache_beam/pipeline.py +++ b/sdks/python/apache_beam/pipeline.py @@ -829,10 +829,9 @@ def _apply_internal( assert isinstance(result.producer.inputs, tuple) if isinstance(result, pvalue.DoOutputsTuple): - all_tags = [result._main_tag] + list(result._tags) - for tag in all_tags: + for tag, pc in list(result._pcolls.items()): if tag not in current.outputs: - current.add_output(result[tag], tag) + current.add_output(pc, tag) continue # If there is already a tag with the same name, increase a counter for diff --git a/sdks/python/apache_beam/pipeline_test.py b/sdks/python/apache_beam/pipeline_test.py index ac3e6ac4afce..b28fe3c3d14e 100644 --- a/sdks/python/apache_beam/pipeline_test.py +++ b/sdks/python/apache_beam/pipeline_test.py @@ -1648,10 +1648,9 @@ def expand(self, pcoll): all_applied_transforms[xform.full_label] = xform current_transforms.extend(xform.parts) xform = all_applied_transforms['Split Sales'] - # Confirm that Split Sales correctly has three outputs: the main - # (untagged) output plus the two tagged outputs specified by - # ParDo.with_outputs in ParentSalesSplitter. - assert len(xform.outputs) == 3 + # Confirm that Split Sales correctly has two outputs as specified by + # ParDo.with_outputs in ParentSalesSplitter. + assert len(xform.outputs) == 2 if __name__ == '__main__':