[issue46058] argparse: arg groups and mutually exclusive groups behave inconsitently

2022-01-01 Thread paul j3
paul j3 added the comment: At least until these latest deprecations, the only nesting that made sense was to put a mutually_exclusive_group inside an argument_group. This was a way of providing a title and description for the exclusive_group. (And not documented.) I don't know if that's s

[issue46058] argparse: arg groups and mutually exclusive groups behave inconsitently

2021-12-16 Thread Irit Katriel
Irit Katriel added the comment: Nesting argument groups and mutually exclusive groups is now deprecated (see issue22047). Thank you for the bug report. Note Paul's comment about why nesting mutually exclusive groups does not give you anything in terms of semantics. -- nosy: +iritkat

[issue46058] argparse: arg groups and mutually exclusive groups behave inconsitently

2021-12-12 Thread Irit Katriel
Change by Irit Katriel : -- versions: -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46058] argparse: arg groups and mutually exclusive groups behave inconsitently

2021-12-12 Thread László Attila Tóth
László Attila Tóth added the comment: Checking the code the add_mutually_exclusive_group has only kwargs, so one part can be fixed (POC, breaks tests): --- Lib/argparse.py +++ Lib/argparse.py @@ -1648,8 +1648,8 @@ def _remove_action(self, action): class _MutuallyExclusiveGroup(_ArgumentGroup

[issue46058] argparse: arg groups and mutually exclusive groups behave inconsitently

2021-12-12 Thread László Attila Tóth
New submission from László Attila Tóth : I tried to add arguments to process DB-related settings, either from typing import Optional from a file or explicitly specifying them. In theory with nested groups (by add_argument_group and add_mutually_exlusive_group) this can be implemented in almost