[issue14364] Argparse incorrectly handles '--' as argument to option

2021-03-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Unassigning because I haven't been able to make time for this one. -- assignee: rhettinger -> ___ Python tracker ___

[issue14364] Argparse incorrectly handles '--' as argument to option

2019-10-07 Thread hai shi
hai shi added the comment: > The PR's Misc/NEWS entry, "Fix behavior of argparse when '--' as argument to > option", is insufficient. Thanks for your comment, Raymond. I would continue update the desc. -- ___ Python tracker

[issue14364] Argparse incorrectly handles '--' as argument to option

2019-10-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: Paul and David, is the current PR complete in your opinion? Are there known cases where the PR would break existing, working code? Also there needs to be doc entry that is clear on both new and old strategy for distinguishing options from arguments when

[issue14364] Argparse incorrectly handles '--' as argument to option

2019-10-05 Thread hai shi
hai shi added the comment: Hi, Jonas. Thanks for your report. Let us wait core team's discuss;) -- ___ Python tracker ___ ___ Pytho

[issue14364] Argparse incorrectly handles '--' as argument to option

2019-10-03 Thread Jonas Schäfer
Jonas Schäfer added the comment: Since I have been adversely affected by this bug ([1]), I looked at the patches. I combined issue14364.test.patch (which adds test cases for --foo=--) and dbldash.patch in my local working tree and that seems to resolve the issue (tests pass if and only if I a

[issue14364] Argparse incorrectly handles '--' as argument to option

2019-09-05 Thread hai shi
Change by hai shi : -- nosy: +rhettinger type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue14364] Argparse incorrectly handles '--' as argument to option

2019-09-05 Thread hai shi
Change by hai shi : -- pull_requests: +15369 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15714 ___ Python tracker ___ __

[issue14364] Argparse incorrectly handles '--' as argument to option

2019-09-05 Thread hai shi
hai shi added the comment: some test cases which paul provided looks doesn't keep compatible. In TestDoubleDashRemoval: # output in my env is Namespace(cmd='cmd', foo=None, rest=['--', '--foo']) ('-- cmd -- -- --foo', NS(cmd='cmd', foo=None, rest=['--', '--', '--foo'])) # output in my env is

[issue14364] Argparse incorrectly handles '--' as argument to option

2016-12-17 Thread paul j3
paul j3 added the comment: I've copied 'dbldash.patch' over from http://bugs.python.org/issue13922. I mistakenly added it to a closed issue. The patch is old, and should be revised. It is also missing tests for this '--opt=--' case, even though it solves it. I also reference this patch i

[issue14364] Argparse incorrectly handles '--' as argument to option

2016-03-27 Thread paul j3
paul j3 added the comment: I made a mistake of trying to add to or refine a closed patch. Maybe I need to move the dbldash.patch over here for more formal consideration. -- ___ Python tracker

[issue14364] Argparse incorrectly handles '--' as argument to option

2016-03-27 Thread Martin Panter
Martin Panter added the comment: In Python 3.5, this does not seem fixed. Issue 13922 is marked as resolved and fixed, but Pauls’s patch has not actually been committed. >>> ap = ArgumentParser() >>> ap.add_argument("-t", "--test", type=str, nargs=1) _StoreAction(option_strings=['-t', '--test']