summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-09-01 02:45:20 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-09-01 02:45:20 (GMT)
commit6fb8fb17bff87fdd5e738430502f34f8729766e3 (patch)
tree3613de4ab17a379161862e2bfece5cf734b1b5a8 /Misc
parent2a0fb147ec7149b732083adedb6c6d1ba5ef8ebb (diff)
downloadcpython-6fb8fb17bff87fdd5e738430502f34f8729766e3.zip
cpython-6fb8fb17bff87fdd5e738430502f34f8729766e3.tar.gz
cpython-6fb8fb17bff87fdd5e738430502f34f8729766e3.tar.bz2
#12776,#11839: call argparse type function only once.
Before, the type function was called twice in the case where the default was specified and the argument was given as well. This was especially problematic for the FileType type, as a default file would always be opened, even if a file argument was specified on the command line. Patch by Arnaud Fontaine, with additional test by Mike Meyer.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS6
2 files changed, 7 insertions, 0 deletions
diff --git a/Misc/ACKS b/Misc/ACKS
index a46ee84..f534143 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -305,6 +305,7 @@ Nils Fischbeck
Frederik Fix
Matt Fleming
Hernán Martínez Foffani
+Arnaud Fontaine
Michael Foord
Amaury Forgeot d'Arc
Doug Fort
diff --git a/Misc/NEWS b/Misc/NEWS
index 8b0b145..c78dc96 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -112,6 +112,12 @@ Core and Builtins
Library
-------
+- Issue #12776,#11839: call argparse type function (specified by add_argument)
+ only once. Before, the type function was called twice in the case where the
+ default was specified and the argument was given as well. This was
+ especially problematic for the FileType type, as a default file would always
+ be opened, even if a file argument was specified on the command line.
+
- Issue #13370: Ensure that ctypes works on Mac OS X when Python is
compiled using the clang compiler