From f150378ef02081bdebf40d33ee2d9b286763b346 Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Wed, 11 Jun 2014 04:31:29 -0700 Subject: Issue #21629: Fix Argument Clinic's "--converters" feature. --- Misc/NEWS | 5 +++++ Tools/clinic/clinic.py | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Misc/NEWS b/Misc/NEWS index e718bcd..4dbcc8c 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -118,6 +118,11 @@ Windows - Issue #21671, CVE-2014-0224: The bundled version of OpenSSL has been updated to 1.0.1h. +Tools/Demos +----------- + +- Issue #21629: Fix Argument Clinic's "--converters" feature. + What's New in Python 3.4.1? =========================== diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index 68a1436..93e8f5a 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -2044,11 +2044,9 @@ def add_default_legacy_c_converter(cls): # automatically add converter for default format unit # (but without stomping on the existing one if it's already # set, in case you subclass) - if ((cls.format_unit != 'O&') and + if ((cls.format_unit not in ('O&', '')) and (cls.format_unit not in legacy_converters)): legacy_converters[cls.format_unit] = cls - if cls.format_unit: - legacy_converters[cls.format_unit] = cls return cls def add_legacy_c_converter(format_unit, **kwargs): -- cgit v0.12