[issue29553] Argparser does not display closing parentheses in nested mutex groups

2019-08-30 Thread Berker Peksag
Berker Peksag added the comment: Yes, we can. Thank you for the backport, Raymond :) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2019-08-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: The backport is done. Can we close this now (and PR 120 which is still shown as open)? -- ___ Python tracker ___

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2019-08-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset bd8ca9aaccef0569c4b5c2e6dad0feb869ffd6c5 by Raymond Hettinger in branch '3.8': [3.8] bpo-29553: Fix ArgumentParser.format_usage() for mutually exclusive groups (GH-14976) (GH-15494) (GH-15624)

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2019-08-30 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +15292 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/15624 ___ Python tracker ___

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2019-08-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Okay, I'll do the backport. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2019-08-30 Thread Berker Peksag
Berker Peksag added the comment: da27d9b9dc44913ffee8f28d9638985eaaa03755 needs to be manually backported to 3.8. -- stage: patch review -> backport needed versions: +Python 3.8 -Python 2.7, Python 3.5 ___ Python tracker

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2019-08-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Is this resolved or this there still more to do? -- ___ Python tracker ___ ___

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2019-08-29 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: bethard -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2019-08-25 Thread Berker Peksag
Berker Peksag added the comment: New changeset 31ea447ffe591736af1d7a3178c0f7ca3eb50d70 by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-29553: Fix ArgumentParser.format_usage() for mutually exclusive groups (GH-14976)

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2019-08-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +15182 pull_request: https://github.com/python/cpython/pull/15494 ___ Python tracker ___

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2019-08-25 Thread Berker Peksag
Berker Peksag added the comment: New changeset da27d9b9dc44913ffee8f28d9638985eaaa03755 by Berker Peksag (Flavian Hautbois) in branch 'master': bpo-29553: Fix ArgumentParser.format_usage() for mutually exclusive groups (GH-14976)

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2019-07-27 Thread Flavian Hautbois
Change by Flavian Hautbois : -- keywords: +patch pull_requests: +14745 pull_request: https://github.com/python/cpython/pull/14976 ___ Python tracker ___

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2019-03-30 Thread mental
mental added the comment: Can this issue be closed? It's been inactive for a while and all it needs is a contributor to merge and close. Seems to me it's been resolved with PRs 117 and 120, the difference between them being 120 drops the inner brackets for the format usage (imo 120 should

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-05-12 Thread Andrew Nester
Andrew Nester added the comment: so any feedback on this? -- ___ Python tracker ___ ___ Python-bugs-list

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-04-02 Thread Andrew Nester
Andrew Nester added the comment: >From my perspective current behaviour is a bit frustrate that's why it would >be nice to have this issue fixed, but I would say it's critic one. At the same time it doesn't introduce any BC breaking changes and kind safe --

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-03-24 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: -brian.curtin ___ Python tracker ___ ___

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-03-24 Thread paul j3
paul j3 added the comment: How would you rank this issue relative to other `argparse` ones? Currently I'm following 123 open issues. -- ___ Python tracker

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-03-24 Thread Andrew Nester
Andrew Nester added the comment: any updates? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-26 Thread Andrew Nester
Andrew Nester added the comment: JFYI, from my perspective as a developer PR 120 is more preferred one. -- ___ Python tracker ___

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-26 Thread paul j3
paul j3 added the comment: I should probably give PR 120 more credit. By checking the group's container it in effect eliminates this overlapping action problem. Nested groups aren't used in the usage, just the union xor. Maybe the question is, which is better for the user? To tell them up

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-26 Thread paul j3
paul j3 added the comment: The PR117 patch adds an apparent symmetry. There's a if/else for 'start', so shouldn't there also be one for 'end'? if start in inserts: inserts[start] += ' [' else: inserts[start] = '[' But why the '+=' case? It's needed for cases like

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-22 Thread paul j3
paul j3 added the comment: I played around with the patch 117. I was wrong in thinking this was another case of excess brackets being wrongly purged. The fix works by adding ending ] that were missing the original. And it does add a symmetry to the code. But it is easy to construct a set

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-22 Thread paul j3
paul j3 added the comment: http://bugs.python.org/issue22047 "argparse improperly prints mutually exclusive options when they are in a group" is similar. - There are two issues: - the nesting of mutually exclusive groups - the formatting of the usage in such cases. Both have come up

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-22 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-19 Thread Berker Peksag
Berker Peksag added the comment: FWIW, I also prefer PR 120 over PR 117. However, if Steven prefers PR 120 we probably should merge it only in master. -- nosy: +berker.peksag stage: -> patch review versions: +Python 3.5, Python 3.7 ___ Python

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-16 Thread Brian Curtin
Brian Curtin added the comment: PR 120 looks fine to me, but Steven Bethard is the maintainer of argparse so he's better suited to say for sure if exclusive groups are ok how they are in 120 or if 117 is actually the way forward. -- assignee: -> bethard

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-16 Thread Andrew Nester
Andrew Nester added the comment: any updates on this? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-15 Thread Andrew Nester
Andrew Nester added the comment: Ive just added alternative PR that drops inner brackets. So we've got options to choose! -- ___ Python tracker ___

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-15 Thread Andrew Nester
Changes by Andrew Nester : -- pull_requests: +80 ___ Python tracker ___ ___

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-15 Thread Brian Curtin
Brian Curtin added the comment: Dropping the inner brackets sounds like a better move to me. -- nosy: +bethard, brian.curtin ___ Python tracker ___

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-15 Thread Christoph Stahl
Christoph Stahl added the comment: Hi, I thought a bit about the problem and came up with the following: The | in the usage is de facto an XOR operator. Exactly one of the options can be used. The XOR operator has the associative property, meaning: (A XOR B) XOR C = A XOR (B XOR C) So

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-15 Thread Andrew Nester
Andrew Nester added the comment: I've just added PR fixing this. -- nosy: +andrewnester ___ Python tracker ___

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-15 Thread Andrew Nester
Changes by Andrew Nester : -- pull_requests: +76 ___ Python tracker ___ ___

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-14 Thread Christoph Stahl
Changes by Christoph Stahl : -- type: -> behavior ___ Python tracker ___

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-14 Thread Christoph Stahl
New submission from Christoph Stahl: When creating nested mutually exclusive groups, all closing brackets except one are omitted. Example: parser = ArgumentParser() group = parser.add_mutually_exclusive_group() group.add_argument('-a') group.add_argument('-b') group2 =