This is an automated email from the ASF dual-hosted git repository.
tvalentyn 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 b025102b024 When more than one instance of the same PipelineOption
subclass is detected, use the first one. (#36704)
b025102b024 is described below
commit b025102b024ba5ab888491f266acb62e901a779a
Author: tvalentyn <[email protected]>
AuthorDate: Tue Nov 4 11:54:40 2025 -0800
When more than one instance of the same PipelineOption subclass is
detected, use the first one. (#36704)
---
sdks/python/apache_beam/options/pipeline_options.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdks/python/apache_beam/options/pipeline_options.py
b/sdks/python/apache_beam/options/pipeline_options.py
index 57056b395f6..be9f530ffdc 100644
--- a/sdks/python/apache_beam/options/pipeline_options.py
+++ b/sdks/python/apache_beam/options/pipeline_options.py
@@ -508,7 +508,7 @@ class PipelineOptions(HasDisplayData):
subset = {}
parser = _BeamArgumentParser(allow_abbrev=False)
for cls in PipelineOptions.__subclasses__():
- subset[str(cls)] = cls
+ subset.setdefault(str(cls), cls)
for cls in subset.values():
cls._add_argparse_args(parser) # pylint: disable=protected-access
if add_extra_args_fn: