diff --git a/CHANGES.md b/CHANGES.md index 1cefcd936322..fd03ae4d3889 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -84,6 +84,7 @@ * X behavior was changed ([#X](https://github.com/apache/beam/issues/X)). * Yapf version upgraded to 0.43.0 for formatting (Python) ([#34801](https://github.com/apache/beam/pull/34801/)). * Python: Added JupyterLab 4.x extension compatibility for enhanced notebook integration ([#34495](https://github.com/apache/beam/pull/34495)). +* Python: Argument abbreviation is no longer enabled within Beam. If you previously abbreviated arguments (e.g. `--r` for `--runner`), you will now need to specify the whole argument ([#34934](https://github.com/apache/beam/pull/34934)). ## Deprecations diff --git a/sdks/python/apache_beam/options/pipeline_options.py b/sdks/python/apache_beam/options/pipeline_options.py index b51b85963c69..f41d63bea4ac 100644 --- a/sdks/python/apache_beam/options/pipeline_options.py +++ b/sdks/python/apache_beam/options/pipeline_options.py @@ -290,7 +290,7 @@ def __init__(self, flags: Optional[Sequence[str]] = None, **kwargs) -> None: # Build parser that will parse options recognized by the [sub]class of # PipelineOptions whose object is being instantiated. - parser = _BeamArgumentParser() + parser = _BeamArgumentParser(allow_abbrev=False) for cls in type(self).mro(): if cls == PipelineOptions: break @@ -405,7 +405,7 @@ def get_all_options( # sub-classes in the main session might be repeated. Pick last unique # instance of each subclass to avoid conflicts. subset = {} - parser = _BeamArgumentParser() + parser = _BeamArgumentParser(allow_abbrev=False) for cls in PipelineOptions.__subclasses__(): subset[str(cls)] = cls for cls in subset.values():