[issue12776] argparse: type conversion function should be called only once

2014-05-29 Thread paul j3
Changes by paul j3 ajipa...@gmail.com: -- nosy: +paul.j3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___ ___ Python-bugs-list mailing list

[issue12776] argparse: type conversion function should be called only once

2013-03-31 Thread Éric Araujo
Éric Araujo added the comment: FTR a contributor to #13271 (--help should work even if a type converter fails) indicated that it’s fixed by this patch, so it may be good to add a regression test. -- ___ Python tracker rep...@bugs.python.org

[issue12776] argparse: type conversion function should be called only once

2012-08-31 Thread R. David Murray
R. David Murray added the comment: Thanks, Arnaud and Mike. (And Steven, of course :) -- nosy: +r.david.murray resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue12776] argparse: type conversion function should be called only once

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

[issue12776] argparse: type conversion function should be called only once

2012-07-21 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: The patch looks good to me. I've updated it for trunk and to include Mike Meyer's additional test. All argparse tests pass. Anyone who's able to commit and backport, please do. (I should be able to commit myself, but it's now been too

[issue12776] argparse: type conversion function should be called only once

2012-05-02 Thread Mike Meyer
Mike Meyer m...@mired.org added the comment: I've just verified that this patch also fixes 13824 and 11839. The attached patchfile adds a test to verify that using a non-existent default file fails if you don't specify the argument, and succeeds if you do. Could someone please apply it?

[issue12776] argparse: type conversion function should be called only once

2012-05-02 Thread Mike Meyer
Mike Meyer m...@mired.org added the comment: Sorry - got ahead of myself. It doesn't fix 13824. A deeper reading reveals that the problem wasn't quite what I thought it on first glance. -- ___ Python tracker rep...@bugs.python.org

[issue12776] argparse: type conversion function should be called only once

2012-03-18 Thread Arnaud Fontaine
Arnaud Fontaine ar...@debian.org added the comment: Could you please apply this patch? It's been 4 months without reply now... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___

[issue12776] argparse: type conversion function should be called only once

2012-01-25 Thread Arnaud Fontaine
Arnaud Fontaine ar...@debian.org added the comment: ping? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___ ___ Python-bugs-list mailing

[issue12776] argparse: type conversion function should be called only once

2011-12-15 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: Could you add a test to verify that custom actions are still getting the converted values passed to their __call__? I suspect this may not be happening under the current patch - if that's the case, you may also need to add conversions

[issue12776] argparse: type conversion function should be called only once

2011-12-15 Thread Arnaud Fontaine
Arnaud Fontaine ar...@debian.org added the comment: Could you add a test to verify that custom actions are still getting the converted values passed to their __call__? I suspect this may not be happening under the current patch - if that's the case, you may also need to add

[issue12776] argparse: type conversion function should be called only once

2011-12-15 Thread Arnaud Fontaine
Changes by Arnaud Fontaine ar...@debian.org: Added file: http://bugs.python.org/file23972/py2.7-argparse-call-type-function-once-v4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___

[issue12776] argparse: type conversion function should be called only once

2011-12-15 Thread Arnaud Fontaine
Changes by Arnaud Fontaine ar...@debian.org: Added file: http://bugs.python.org/file23973/py3k-argparse-call-type-function-once-v4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___

[issue12776] argparse: type conversion function should be called only once

2011-11-24 Thread flying sheep
flying sheep flying-sh...@web.de added the comment: this is annoying: i’m creating a reindentation script that reindents any valid python script. the user can specify if, and how many spaces he/she wants to use per indentation level. `0` or leaving the option out means “one tab per level”.

[issue12776] argparse: type conversion function should be called only once

2011-11-24 Thread Arnaud Fontaine
Arnaud Fontaine ar...@debian.org added the comment: Does the patch I attached fix your issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___

[issue12776] argparse: type conversion function should be called only once

2011-11-24 Thread flying sheep
flying sheep flying-sh...@web.de added the comment: i don’t know, since i get python from the ubuntu repositories, sorry. in which python release will this patch first be integrated? -- ___ Python tracker rep...@bugs.python.org

[issue12776] argparse: type conversion function should be called only once

2011-11-24 Thread Arnaud Fontaine
Arnaud Fontaine ar...@debian.org added the comment: It would definitely help if you could apply the patch for Python 2.7 manually on your local installation (after making a backup of course). You can just download the patch for Python 2.7 then (only the first part of the patch can be applied,

[issue12776] argparse: type conversion function should be called only once

2011-11-24 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Mucking with your installed Python is probably a bad idea, and it may also be an old version (compared to the current development version which has seen hundreds of changes) where testing the patch would not give useful results. Please see the

[issue12776] argparse: type conversion function should be called only once

2011-11-24 Thread Arnaud Fontaine
Arnaud Fontaine ar...@debian.org added the comment: I have had a look at the issue more closely and my initial patch was not completely right as it didn't work properly with argparse_test.py despite all tests passing. Therefore, I have amended my patch to not check whether action.default was

[issue12776] argparse: type conversion function should be called only once

2011-11-24 Thread Arnaud Fontaine
Changes by Arnaud Fontaine ar...@debian.org: Added file: http://bugs.python.org/file23775/py2.7-argparse-call-type-function-once-v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___

[issue12776] argparse: type conversion function should be called only once

2011-11-24 Thread Arnaud Fontaine
Changes by Arnaud Fontaine ar...@debian.org: Added file: http://bugs.python.org/file23776/py3k-argparse-call-type-function-once-v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___

[issue12776] argparse: type conversion function should be called only once

2011-11-24 Thread Arnaud Fontaine
Arnaud Fontaine ar...@debian.org added the comment: BTW, about argparse_test, the default should be either '0' or 0 but not '\t' AFAIK because even the default value is converted using the given type function. It fails even with the last 2.7 version but it works well with my patch...

[issue12776] argparse: type conversion function should be called only once

2011-09-30 Thread Arnaud Fontaine
Arnaud Fontaine ar...@debian.org added the comment: Any news about applying these patches? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___

[issue12776] argparse: type conversion function should be called only once

2011-08-21 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for the patch. I commented on the code review site, you should have received an email. -- nosy: +eric.araujo versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue12776] argparse: type conversion function should be called only once

2011-08-21 Thread Arnaud Fontaine
Arnaud Fontaine ar...@debian.org added the comment: Thanks for the review. Sorry to send that here instead of the review page, but I get an error when replying: Invalid XSRF token.. This looks good, especially if all existing tests still pass as you report, but I wonder about one thing:

[issue12776] argparse: type conversion function should be called only once

2011-08-21 Thread Arnaud Fontaine
Changes by Arnaud Fontaine ar...@debian.org: Removed file: http://bugs.python.org/file22927/py2.7-argparse-call-type-function-once.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___

[issue12776] argparse: type conversion function should be called only once

2011-08-21 Thread Arnaud Fontaine
Changes by Arnaud Fontaine ar...@debian.org: Removed file: http://bugs.python.org/file22928/py3k-argparse-call-type-function-once.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___

[issue12776] argparse: type conversion function should be called only once

2011-08-21 Thread Arnaud Fontaine
Changes by Arnaud Fontaine ar...@debian.org: Added file: http://bugs.python.org/file22978/py2.7-argparse-call-type-function-once.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___

[issue12776] argparse: type conversion function should be called only once

2011-08-21 Thread Arnaud Fontaine
Changes by Arnaud Fontaine ar...@debian.org: Added file: http://bugs.python.org/file22979/py3k-argparse-call-type-function-once.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___

[issue12776] argparse: type conversion function should be called only once

2011-08-18 Thread Arnaud Fontaine
New submission from Arnaud Fontaine ar...@debian.org: When specifying a function to be called in type keyword argument of add_argument(), the function is actually called twice (when a default value is set and then when the argument is given). While this may not be a problem in most cases

[issue12776] argparse: type conversion function should be called only once

2011-08-18 Thread Arnaud Fontaine
Changes by Arnaud Fontaine ar...@debian.org: -- keywords: +patch Added file: http://bugs.python.org/file22927/py2.7-argparse-call-type-function-once.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776

[issue12776] argparse: type conversion function should be called only once

2011-08-18 Thread Arnaud Fontaine
Changes by Arnaud Fontaine ar...@debian.org: Added file: http://bugs.python.org/file22928/py3k-argparse-call-type-function-once.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___

[issue12776] argparse: type conversion function should be called only once

2011-08-18 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +bethard ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___ ___ Python-bugs-list mailing list