[issue11874] argparse assertion failure with brackets in metavars

2018-06-09 Thread Nick Coghlan
Change by Nick Coghlan : -- stage: backport needed -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue11874] argparse assertion failure with brackets in metavars

2018-06-08 Thread miss-islington
miss-islington added the comment: New changeset 4e6bd247aa955056626bf0cf8dc1c65a587b871f by Miss Islington (bot) in branch '2.7': bpo-11874: fix assertion failure in argparse metavar handling (GH-1826) https://github.com/python/cpython/commit/4e6bd247aa955056626bf0cf8dc1c65a587b871f

[issue11874] argparse assertion failure with brackets in metavars

2018-06-08 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for the PR, and your patience! The change has now been merged for all active 3.x versions. It turns out the 2.7 argparse code is still close enough to the 3.x code for the automated backport to work, so the CI for that is currently running. --

[issue11874] argparse assertion failure with brackets in metavars

2018-06-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +7185 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11874] argparse assertion failure with brackets in metavars

2018-06-08 Thread miss-islington
miss-islington added the comment: New changeset 842985f6c70484ed7b8fc30d0bc05aec73236a98 by Miss Islington (bot) in branch '3.7': bpo-11874: fix assertion failure in argparse metavar handling (GH-1826) https://github.com/python/cpython/commit/842985f6c70484ed7b8fc30d0bc05aec73236a98

[issue11874] argparse assertion failure with brackets in metavars

2018-06-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +7166 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11874] argparse assertion failure with brackets in metavars

2018-06-08 Thread miss-islington
miss-islington added the comment: New changeset 376c272d68cca0975ff0be3d12abf5f67da342d7 by Miss Islington (bot) in branch '3.6': bpo-11874: fix assertion failure in argparse metavar handling (GH-1826) https://github.com/python/cpython/commit/376c272d68cca0975ff0be3d12abf5f67da342d7

[issue11874] argparse assertion failure with brackets in metavars

2018-06-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +7160 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11874] argparse assertion failure with brackets in metavars

2018-06-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +7156 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11874] argparse assertion failure with brackets in metavars

2018-06-08 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 66f02aa32f1e4adb9f24cf186f8c495399d5ce9b by Nick Coghlan (wim glenn) in branch 'master': bpo-11874: fix assertion failure in argparse metavar handling (GH-1826) https://github.com/python/cpython/commit/66f02aa32f1e4adb9f24cf186f8c495399d5ce9b

[issue11874] argparse assertion failure with brackets in metavars

2017-09-14 Thread wim glenn
Changes by wim glenn : -- versions: +Python 3.6, Python 3.7 ___ Python tracker ___ ___

[issue11874] argparse assertion failure with brackets in metavars

2017-06-05 Thread wim glenn
wim glenn added the comment: May I ask, how to assign reviewers for CPython pull requests? https://github.com/python/cpython/pull/1826 has been sitting there for 10 days and the only comment was from a bot. -- ___ Python tracker

[issue11874] argparse assertion failure with brackets in metavars

2017-05-30 Thread wim glenn
Changes by wim glenn : -- nosy: +wim.glenn ___ Python tracker ___ ___ Python-bugs-list

[issue11874] argparse assertion failure with brackets in metavars

2017-05-26 Thread paul j3
paul j3 added the comment: Any changes here including the latest pull request might conflict with http://bugs.python.org/issue29553 Argparser does not display closing parentheses in nested mutex groups If someone uses nested mutually exclusive groups (which I don't think they should, but

[issue11874] argparse assertion failure with brackets in metavars

2017-05-26 Thread wim glenn
Changes by wim glenn : -- pull_requests: +1912 ___ Python tracker ___ ___

[issue11874] argparse assertion failure with brackets in metavars

2016-12-12 Thread paul j3
Changes by paul j3 : -- priority: normal -> high ___ Python tracker ___ ___

[issue11874] argparse assertion failure with brackets in metavars

2016-03-21 Thread Matt Pr
Matt Pr added the comment: Same AssertionError is also caused by having certain "choices". Python 2.7.10 global_options.add_argument('--field-sep', choices=[',',';','|','\t'], required=True, help='Field separator that separates columns in a row.') Removing required=True or removing the tab

[issue11874] argparse assertion failure with brackets in metavars

2015-05-05 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- stage: - patch review versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11874 ___

[issue11874] argparse assertion failure with brackets in metavars

2015-05-05 Thread SpaceOne
Changes by SpaceOne pyt...@florianbest.de: -- nosy: +spaceone ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11874 ___ ___ Python-bugs-list mailing

[issue11874] argparse assertion failure with brackets in metavars

2014-10-30 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: -tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11874 ___ ___

[issue11874] argparse assertion failure with brackets in metavars

2014-10-28 Thread Wolfgang Maier
Wolfgang Maier added the comment: It doesn't seem to be the exact same problem, but still this very simple example with parentheses in metavar fails to format correctly: import argparse parser = argparse.ArgumentParser() parser.add_argument(inputfiles, metavar = 'input_file(s)', nargs = +,

[issue11874] argparse assertion failure with brackets in metavars

2014-10-28 Thread paul j3
paul j3 added the comment: The patch with a major rewrite of '_format_actions_usage' handles this usage problem correctly: usage: try_para_in_meta.py [-h] input_file(s) [input_file(s) ...] The error is the result of usage group formatter trying to remove excess `()`. To give an idea of

[issue11874] argparse assertion failure with brackets in metavars

2014-09-09 Thread Zacrath
Changes by Zacrath mrdoom...@gmail.com: -- nosy: +Zacrath ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11874 ___ ___ Python-bugs-list mailing

[issue11874] argparse assertion failure with brackets in metavars

2014-04-24 Thread paul j3
Changes by paul j3 ajipa...@gmail.com: Added file: http://bugs.python.org/file35028/format_usage.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11874 ___

[issue11874] argparse assertion failure with brackets in metavars

2014-04-24 Thread paul j3
Changes by paul j3 ajipa...@gmail.com: Removed file: http://bugs.python.org/file30941/format_usage.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11874 ___

[issue11874] argparse assertion failure with brackets in metavars

2014-04-18 Thread paul j3
paul j3 added the comment: Another example of code hitting this AssertionError. Here the problem was a space in the option argument, '--out '. http://stackoverflow.com/questions/23159845/python-argparse-assertionerror 'parser.add_argument('-o', '--out ', help='b', required = True)' That

[issue11874] argparse assertion failure with brackets in metavars

2013-07-16 Thread paul j3
paul j3 added the comment: Here's a patch that takes a different approach - rewrite _format_actions_usage() so it formats groups (and unattached actions) directly. It uses the same logic to determine when to format a group, but then it calls _format_group_usage() to format the group,

[issue11874] argparse assertion failure with brackets in metavars

2013-07-15 Thread Vajrasky Kok
Vajrasky Kok added the comment: paul j3, thanks for reviewing my patch and giving me credit in your patch for another ticket. Yeah, as you could see, the reason I return arg_parts and text is because the text still needs to undergo the cleanup process. You solved it by putting cleaning up in

[issue11874] argparse assertion failure with brackets in metavars

2013-07-14 Thread Vajrasky Kok
Vajrasky Kok added the comment: Tidied up the unit test. Mixed with arguments without metavar. -- Added file: http://bugs.python.org/file30913/unit_test_argparse.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11874

[issue11874] argparse assertion failure with brackets in metavars

2013-07-14 Thread Vajrasky Kok
Vajrasky Kok added the comment: Attached the preliminary fix and the unit test for this ticket. -- Added file: http://bugs.python.org/file30915/fix_and_unit_test_for_argparse_inner_bracket_bug.txt ___ Python tracker rep...@bugs.python.org

[issue11874] argparse assertion failure with brackets in metavars

2013-07-14 Thread paul j3
paul j3 added the comment: If the arg_parts are passed through the same cleanup as the 'text' (and empty strings removed), then text = ' '.join(arg_parts) In that case there would be no need to return both (text, arg_parts). Parenthesis in the metavar could also create the problem

[issue11874] argparse assertion failure with brackets in metavars

2013-07-14 Thread paul j3
paul j3 added the comment: I just filed a patch with http://bugs.python.org/issue10984 (argparse add_mutually_exclusive_group should accept existing arguments to register conflicts) that includes the latest patch from this issue. I tweaked it so _format_actions_usage only returns arg_parts.

[issue11874] argparse assertion failure with brackets in metavars

2013-07-13 Thread paul j3
Changes by paul j3 ajipa...@gmail.com: -- nosy: +paul.j3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11874 ___ ___ Python-bugs-list mailing list

[issue11874] argparse assertion failure with brackets in metavars

2013-07-13 Thread Vajrasky Kok
Vajrasky Kok added the comment: Attached the unit test. Here is the simpler script to product the bug: import argparse parser = argparse.ArgumentParser(prog='PROG') parser.add_argument ('--a', metavar='a'*76) parser.add_argument ('--b', metavar=[innerpart]outerpart)

[issue11874] argparse assertion failure with brackets in metavars

2013-07-13 Thread Vajrasky Kok
Vajrasky Kok added the comment: Sorry, got typo in last unit test. -- Added file: http://bugs.python.org/file30911/unit_test_for_inner_bracket_metavar.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11874

[issue11874] argparse assertion failure with brackets in metavars

2013-07-13 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Removed file: http://bugs.python.org/file30910/unit_test_for_inner_bracket_metavar.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11874 ___

[issue11874] argparse assertion failure with brackets in metavars

2012-03-18 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11874 ___ ___

[issue11874] argparse assertion failure with brackets in metavars

2011-12-15 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: I agree this is a bug. The patch needs to add unit tests that make sure metavars with [] work as expected. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11874

[issue11874] argparse assertion failure with brackets in metavars

2011-04-29 Thread ysj.ray
ysj.ray ysj@gmail.com added the comment: Seem as a problem in optparse.HelpFormatter._format_usage(): when the generated usage string is too long(longer than 78, e.g.), python tries to break the usage string into parts at some proper positions and group them to multiple lines, then join

[issue11874] argparse assertion failure with brackets in metavars

2011-04-29 Thread ysj.ray
Changes by ysj.ray ysj@gmail.com: -- components: +Library (Lib) -None ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11874 ___ ___

[issue11874] argparse assertion failure with brackets in metavars

2011-04-27 Thread Manveru
Manveru manv...@manveru.pl added the comment: I was a victim of the same issue, but only after my usage list does not fit in one line. Please fix! -- nosy: +manveru ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11874

[issue11874] argparse assertion failure with brackets in metavars

2011-04-27 Thread Xuanji Li
Changes by Xuanji Li xua...@gmail.com: -- nosy: +xuanji ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11874 ___ ___ Python-bugs-list mailing list

[issue11874] argparse assertion failure with brackets in metavars

2011-04-22 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +bethard, eric.araujo versions: +Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11874 ___

[issue11874] argparse assertion failure with brackets in metavars

2011-04-19 Thread Hartmut Niemann
New submission from Hartmut Niemann hartmut.niem...@siemens.com: I run this script with option --help -8-- import argparse parser = argparse.ArgumentParser() parser.add_argument ('--from-itm', dest=from_itm,action=store,default=None,help =Source ITM file,