Skip to content

Commit f150378

Browse files
committed
Issue #21629: Fix Argument Clinic's "--converters" feature.
1 parent 80f2262 commit f150378

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

Misc/NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ Windows
118118
- Issue #21671, CVE-2014-0224: The bundled version of OpenSSL has been
119119
updated to 1.0.1h.
120120

121+
Tools/Demos
122+
-----------
123+
124+
- Issue #21629: Fix Argument Clinic's "--converters" feature.
125+
121126

122127
What's New in Python 3.4.1?
123128
===========================

Tools/clinic/clinic.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2044,11 +2044,9 @@ def add_default_legacy_c_converter(cls):
20442044
# automatically add converter for default format unit
20452045
# (but without stomping on the existing one if it's already
20462046
# set, in case you subclass)
2047-
if ((cls.format_unit != 'O&') and
2047+
if ((cls.format_unit not in ('O&', '')) and
20482048
(cls.format_unit not in legacy_converters)):
20492049
legacy_converters[cls.format_unit] = cls
2050-
if cls.format_unit:
2051-
legacy_converters[cls.format_unit] = cls
20522050
return cls
20532051

20542052
def add_legacy_c_converter(format_unit, **kwargs):

0 commit comments

Comments
 (0)