[issue11839] argparse: unexpected behavior of default for FileType('w')

2012-08-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1b614921aefa by R David Murray in branch '3.2': #12776,#11839: call argparse type function only once. http://hg.python.org/cpython/rev/1b614921aefa New changeset 74f6d87cd471 by R David Murray in branch 'default': Merge #12776,#11839: call argparse

[issue11839] argparse: unexpected behavior of default for FileType('w')

2012-05-03 Thread Paolo Elvati
Changes by Paolo Elvati elv...@umich.edu: -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11839 ___

[issue11839] argparse: unexpected behavior of default for FileType('w')

2012-05-03 Thread Paolo Elvati
Changes by Paolo Elvati elv...@umich.edu: -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11839 ___ ___ Python-bugs-list

[issue11839] argparse: unexpected behavior of default for FileType('w')

2012-05-03 Thread Paolo Elvati
Changes by Paolo Elvati elv...@umich.edu: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11839 ___ ___ Python-bugs-list

[issue11839] argparse: unexpected behavior of default for FileType('w')

2012-05-02 Thread Mike Meyer
Mike Meyer m...@mired.org added the comment: Steven - 12776 indeed fixes this issue. I applied the patch from it to a build of todays checkout, verified that my simple test script worked, then wrote some test cases for test_argparse. I've uploaded the patch for that test to both issues. I

[issue11839] argparse: unexpected behavior of default for FileType('w')

2011-12-15 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: I think Issue 12776, which delays type conversions on defaults, should solve this problem, right? If you agree, could you add your code here as a test case to that issue and mark this as duplicate? --

[issue11839] argparse: unexpected behavior of default for FileType('w')

2011-05-02 Thread Stefan Pfeiffer
Stefan Pfeiffer stefan.pfeif...@gmail.com added the comment: Happens in 3.2, too... Would be nice to see that fixed. Stefan -- nosy: +Stefan.Pfeiffer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11839

[issue11839] argparse: unexpected behavior of default for FileType('w')

2011-04-27 Thread Manveru
Manveru manv...@manveru.pl added the comment: I have the same issue with default here with 2.7. Fortunately I have my own type function so I can prevent is by changing my internal state. This is however only a workaround for real bug in the argparse. -- nosy: +manveru versions:

[issue11839] argparse: unexpected behavior of default for FileType('w')

2011-04-12 Thread Paolo Elvati
New submission from Paolo Elvati elv...@umich.edu: Hi, when a default is specified for a file argument that is open with writing permission (FileType('w')), the default file is always created even if the argument is specified in the command line. For example he code: import argparse parser