[issue9340] argparse parse_known_args does not work with subparsers

2010-11-02 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: Fixed with a variant of Catherine's patch (following R. David Murray's suggestion of inlining the two methods) in r86111 (3.X) and r86112 (2.7). Also added one more test to make sure that the order of the extra arguments is consistent

[issue9340] argparse parse_known_args does not work with subparsers

2010-10-30 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I've looked over this patch, and it seems to me that there is no compelling reason to create two new functions. I think it would be clearer to just inline that code in the places it is used. If it turns out later that the code needs

[issue9340] argparse parse_known_args does not work with subparsers

2010-10-30 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- stage: needs patch - patch review versions: +Python 3.1 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9340 ___

[issue9340] argparse parse_known_args does not work with subparsers

2010-10-29 Thread Guandalino
Changes by Guandalino guandal...@gmail.com: -- nosy: +guandalino ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9340 ___ ___ Python-bugs-list

[issue9340] argparse parse_known_args does not work with subparsers

2010-08-04 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: This patch fixes it with a fourth approach: if unrecognized arguments are found during subparser parsing, information about them is inserted into the namespace (under ._unrecognized), and the decision about whether to exit is

[issue9340] argparse parse_known_args does not work with subparsers

2010-08-03 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: Some basic unit tests for parse_known_args on a subparser. -- keywords: +patch nosy: +catherine Added file: http://bugs.python.org/file18344/test_subparser_parse_known_args.patch ___

[issue9340] argparse parse_known_args does not work with subparsers

2010-08-03 Thread Catherine Devlin
Changes by Catherine Devlin fredv8vi...@liquidid.net: Removed file: http://bugs.python.org/file18344/test_subparser_parse_known_args.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9340 ___

[issue9340] argparse parse_known_args does not work with subparsers

2010-08-03 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: Some simple unit tests for parse_known_args on a parser with a subparser. They are indeed failing on the trunk. -- Added file: http://bugs.python.org/file18346/test_subparser_parse_known_args.patch

[issue9340] argparse parse_known_args does not work with subparsers

2010-07-23 Thread Steven Bethard
New submission from Steven Bethard steven.beth...@gmail.com: [Moved from http://code.google.com/p/argparse/issues/detail?id=45] If you try to use parse_known_args and you have a subparser, the subparser will still complain if it sees extra arguments: parser = argparse.ArgumentParser()