[issue27859] argparse - subparsers does not retain namespace

2016-10-06 Thread Ned Deily
Changes by Ned Deily : -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> argparse set_defaults on subcommands should override top level set_defaults ___ Python tracker

[issue27859] argparse - subparsers does not retain namespace

2016-10-05 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Seems like this can be closed. Thanks. -- nosy: +Mariatta ___ Python tracker ___

[issue27859] argparse - subparsers does not retain namespace

2016-10-03 Thread Nick Papior
Nick Papior added the comment: Sorry I haven't responded previously. Thanks a lot for helping me. I hadn't realized the `register` function. -- ___ Python tracker

[issue27859] argparse - subparsers does not retain namespace

2016-09-04 Thread paul j3
paul j3 added the comment: I've posted a file that runs your code as you expect. It uses a custom Action class (like your test case). It subclasses ._SubParsersAction, and replaces the 9351 namespace use with the original one. I use the registry to change the class that

[issue27859] argparse - subparsers does not retain namespace

2016-09-03 Thread paul j3
paul j3 added the comment: This call used to be namespace, arg_strings = parser.parse_known_args(arg_strings, namespace) But in 2014 (2.7.9) http://bugs.python.org/issue9351 was implemented As noted in the title and comment in the code, the idea was to give more power to the defaults set

[issue27859] argparse - subparsers does not retain namespace

2016-08-25 Thread Eric N. Vander Weele
Changes by Eric N. Vander Weele : -- nosy: +ericvw ___ Python tracker ___ ___

[issue27859] argparse - subparsers does not retain namespace

2016-08-25 Thread SilentGhost
Changes by SilentGhost : -- stage: -> needs patch versions: -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___

[issue27859] argparse - subparsers does not retain namespace

2016-08-25 Thread Nick Papior
New submission from Nick Papior: Using argparse does not retain the Namespace variable across sub-parsers. This prohibits customization of Actions due to "upper" level arguments not being stored in the namespace passed to the sub-parsers. Hence, one may not create different sub-parsers which