Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bpo-33109: argparse subparsers are once again not required by default (GH-6919) | Ned Deily | 2018-05-24 | 1 | -1/+1 |
| | | | | | | | | | bpo-26510 in 3.7.0a2 changed the behavior of argparse to make subparsers required by default, returning to the behavior of 2.7 and 3.2. The behavior was changed in 3.3 to be no longer required. While it might make more sense to have the default to required, compatibility with 3.3 through 3.6 is probably less disruptive than trying to reintroduce compatibility with 2.7 at this point. This change restores the 3.6 behavior. | ||||
* | OrderedDict import is no longer needed (#4890) | Raymond Hettinger | 2018-01-12 | 1 | -2/+1 |
| | |||||
* | bpo-30152: Reduce the number of imports for argparse. (#1269) | Serhiy Storchaka | 2017-09-25 | 1 | -14/+26 |
| | |||||
* | bpo-26510: make argparse subparsers required by default (#3027) | Anthony Sottile | 2017-09-20 | 1 | -0/+2 |
| | | | | | | This fixes a regression from Python 2. To get optional subparsers, use the new parameter ``add_subparsers(required=False)``. Patch by Anthony Sottile. | ||||
* | bpo-14191 Add parse_intermixed_args. (#3319) | R. David Murray | 2017-09-07 | 1 | -0/+95 |
| | | | This adds support for parsing a command line where options and positionals are intermixed as is common in many unix commands. This is paul.j3's patch with a few tweaks. | ||||
* | Issue #29290: Merge 3.5. | Xiang Zhang | 2017-01-22 | 1 | -1/+1 |
|\ | |||||
| * | Issue #29290: argparse help messages won't wrap at non-breaking spaces. | Xiang Zhang | 2017-01-22 | 1 | -1/+1 |
| | | |||||
* | | Issue #12713: reverted fix pending further discussion. | Vinay Sajip | 2016-08-23 | 1 | -18/+5 |
| | | |||||
* | | Closes #12713: Allowed abbreviation of subcommands in argparse. | Vinay Sajip | 2016-08-18 | 1 | -5/+18 |
| | | |||||
* | | Issue #17940: Remove redundant code from _Section.format_help() | Berker Peksag | 2016-03-05 | 1 | -2/+0 |
| | | | | | | | | | | | | | | | | | | | | | | Output of func(*args) stored in the next line: item_help = join([func(*args) for func, args in self.items]) _Section.items only used by HelpFormatter._add_item() and it looks like it doesn't have any side effects. Patch by Yogesh Chaudhari. | ||||
* | | Issue #24360: Improve __repr__ of argparse.Namespace() for invalid identifiers. | Berker Peksag | 2015-07-29 | 1 | -1/+7 |
|/ | | | | Patch by Matthias Bussonnier. | ||||
* | Issue #14910: Add allow_abbrev parameter to argparse.ArgumentParser. | Berker Peksag | 2015-02-13 | 1 | -18/+22 |
| | | | | Patch by Jonathan Paugh, Steven Bethard, paul j3 and Daniel Eriksson. | ||||
* | Issue #23326: Removed __ne__ implementations. Since fixing default __ne__ | Serhiy Storchaka | 2015-01-31 | 1 | -5/+0 |
| | | | | implementation in issue #21408 they are redundant. | ||||
* | Closes #22675: fix typo. | Georg Brandl | 2014-10-20 | 1 | -1/+1 |
| | |||||
* | #9351: set_defaults on subparser is no longer ignored if set on parent. | R David Murray | 2014-10-17 | 1 | -1/+8 |
| | | | | | | | | Before, if a default was set on the parent parser, any default for that variable set via set_defaults on a subparser would be ignored. Now the subparser set_defaults is honored. Patch by Jyrki Pullianinen. | ||||
* | Issue #21481: Teach argparse equality tests to return NotImplemented when ↵ | Raymond Hettinger | 2014-05-26 | 1 | -0/+4 |
| | | | | comparing to unknown types. | ||||
* | Issue #13107: argparse and optparse no longer raises an exception when output | Serhiy Storchaka | 2014-01-09 | 1 | -3/+5 |
|\ | | | | | | | | | a help on environment with too small COLUMNS. Based on patch by Elazar Gershuni. | ||||
| * | Issue #13107: argparse and optparse no longer raises an exception when output | Serhiy Storchaka | 2014-01-09 | 1 | -3/+5 |
| | | | | | | | | | | a help on environment with too small COLUMNS. Based on patch by Elazar Gershuni. | ||||
* | | Issue #18920: argparse's default version action (for -v, --version) should | Eli Bendersky | 2013-09-06 | 1 | -1/+2 |
| | | | | | | | | | | | | output to stdout, matching the 'python -v' Reported by Wolfgang Maier | ||||
* | | Issue #17047: remove doubled words added in 3.4, | Terry Jan Reedy | 2013-03-11 | 1 | -1/+1 |
| | | | | | | | | as reported by Serhiy Storchaka and Matthew Barnett. | ||||
* | | modernize some modules' code by using with statement around open() | Giampaolo Rodola' | 2013-02-12 | 1 | -4/+1 |
| | | |||||
* | | Replace IOError with OSError (#16715) | Andrew Svetlov | 2012-12-25 | 1 | -2/+2 |
| | | |||||
* | | #11175: argparse.FileType now accepts encoding and errors arguments. | Petri Lehtinen | 2012-12-15 | 1 | -3/+13 |
| | | | | | | | | Patch by Lucas Maystre. | ||||
* | | utilize yield from | Philip Jenvey | 2012-10-01 | 1 | -2/+1 |
|/ | |||||
* | Merge 3.2 fix updates and tests for issue #15906. | Barry Warsaw | 2012-09-12 | 1 | -1/+1 |
|\ | |||||
| * | Update merge from 2.7: s/basetring/str | Barry Warsaw | 2012-09-12 | 1 | -1/+1 |
| | | |||||
| * | A follow up for issue #15906: change the test for calling the type conversion | Barry Warsaw | 2012-09-12 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | on the action's default, reverting it back to previous behavior. Conversion is only done on string defaults. Add a test for this and another test that ensures such type conversions are only called once. | ||||
* | | - Issue #15906: Fix a regression in argparse caused by the preceding change, | Barry Warsaw | 2012-09-12 | 1 | -0/+1 |
|\ \ | |/ | | | | | when action='append', type='str' and default=[]. | ||||
| * | - Issue #15906: Fix a regression in argparse caused by the preceding change, | Barry Warsaw | 2012-09-12 | 1 | -0/+1 |
| | | | | | | | | when action='append', type='str' and default=[]. | ||||
* | | merge #15847: allow args to be a tuple in parse_args | R David Murray | 2012-09-08 | 1 | -1/+4 |
|\ \ | |/ | | | | | | | | | | | | | This fixes a regression introduced by the fix for issue #13922. Although args is not documented as being allowed to be a tuple, previously this worked and so naturally there are programs in the field that depend on it. Patch by Zbyszek Jędrzejewski-Szmek. | ||||
| * | #15847: allow args to be a tuple in parse_args | R David Murray | 2012-09-08 | 1 | -1/+4 |
| | | | | | | | | | | | | | | | | This fixes a regression introduced by the fix for issue #13922. Although args is not documented as being allowed to be a tuple, previously this worked and so naturally there are programs in the field that depend on it. Patch by Zbyszek Jędrzejewski-Szmek. | ||||
* | | Merge #12776,#11839: call argparse type function only once. | R David Murray | 2012-09-01 | 1 | -7/+19 |
|\ \ | |/ | | | | | | | | | | | | | | | Before, the type function was called twice in the case where the default was specified and the argument was given as well. This was especially problematic for the FileType type, as a default file would always be opened, even if a file argument was specified on the command line. Patch by Arnaud Fontaine, with additional test by Mike Meyer. | ||||
| * | #12776,#11839: call argparse type function only once. | R David Murray | 2012-09-01 | 1 | -7/+14 |
| | | | | | | | | | | | | | | | | | | Before, the type function was called twice in the case where the default was specified and the argument was given as well. This was especially problematic for the FileType type, as a default file would always be opened, even if a file argument was specified on the command line. Patch by Arnaud Fontaine, with additional test by Mike Meyer. | ||||
* | | Merge #13922: argparse no longer incorrectly strips '--' after the first one. | R David Murray | 2012-07-22 | 1 | -2/+5 |
|\ \ | |/ | | | | | Patch by Jeff Knupp. | ||||
| * | #13922: argparse no longer incorrectly strips '--' after the first one. | R David Murray | 2012-07-22 | 1 | -2/+5 |
| | | | | | | | | Patch by Jeff Knupp. | ||||
* | | Merge #12353: argparse now correctly handles null argument values. | R David Murray | 2012-07-22 | 1 | -1/+1 |
|\ \ | |/ | | | | | Patch by Torsten Landschoff. | ||||
| * | #12353: argparse now correctly handles null argument values. | R David Murray | 2012-07-22 | 1 | -1/+1 |
| | | | | | | | | Patch by Torsten Landschoff. | ||||
* | | Merge #14391: clarify docstring discussion of Action's 'type' argument's value. | R David Murray | 2012-07-21 | 1 | -4/+4 |
|\ \ | |/ | |||||
| * | #14391: clarify docstring discussion of Action's 'type' argument's value. | R David Murray | 2012-07-21 | 1 | -4/+4 |
| | | |||||
* | | Issue #13248: argparse: Remove obsolete argument "version" of ArgumentParser. | Florent Xicluna | 2012-07-07 | 1 | -36/+1 |
| | | |||||
* | | Merge 3.2 | Florent Xicluna | 2011-10-28 | 1 | -7/+3 |
|\ \ | |/ | |||||
| * | Closes #13258: Use callable() built-in in the standard library. | Florent Xicluna | 2011-10-28 | 1 | -7/+3 |
| | | |||||
* | | #13012: use splitlines(keepends=True/False) instead of splitlines(0/1). | Ezio Melotti | 2011-09-28 | 1 | -1/+1 |
| | | |||||
* | | #10424: argument names are now included in the missing argument message | R David Murray | 2011-06-09 | 1 | -10/+5 |
| | | | | | | | | Fix and initial test patch by Michele Orrù. | ||||
* | | Issue #9347: Fix formatting for tuples in argparse type= error messages. | Steven Bethard | 2011-04-04 | 1 | -2/+2 |
|\ \ | |/ | |||||
| * | Issue #9347: Fix formatting for tuples in argparse type= error messages. | Steven Bethard | 2011-04-03 | 1 | -2/+2 |
| | | |||||
* | | Issue #9026: Fix order of argparse sub-commands in help messages. (Merged ↵ | Steven Bethard | 2011-03-27 | 1 | -1/+2 |
|\ \ | |/ | | | | | from 3.2.) | ||||
| * | Issue #9026: Fix order of argparse sub-commands in help messages. | Steven Bethard | 2011-03-27 | 1 | -1/+2 |
| | | |||||
* | | Issue #9348: Raise an early error if argparse nargs and metavar don't match. ↵ | Steven Bethard | 2011-03-26 | 1 | -0/+7 |
|\ \ | |/ | | | | | (Merge from 3.2.) | ||||
| * | Issue #9348: Raise an early error if argparse nargs and metavar don't match. | Steven Bethard | 2011-03-26 | 1 | -0/+7 |
| | |