changeset: 106128:d9539a5c2315 branch: 2.7 parent: 106105:4ce22d69e134 user: Serhiy Storchaka date: Fri Jan 13 09:37:56 2017 +0200 files: Lib/ctypes/__init__.py Misc/NEWS description: Issue #29219: Fixed infinite recursion in the repr of uninitialized ctypes.CDLL instances. diff -r 4ce22d69e134 -r d9539a5c2315 Lib/ctypes/__init__.py --- a/Lib/ctypes/__init__.py Thu Jan 12 17:00:32 2017 +0200 +++ b/Lib/ctypes/__init__.py Fri Jan 13 09:37:56 2017 +0200 @@ -342,6 +342,10 @@ """ _func_flags_ = _FUNCFLAG_CDECL _func_restype_ = c_int + # default values for repr + _name = '' + _handle = 0 + _FuncPtr = None def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, diff -r 4ce22d69e134 -r d9539a5c2315 Misc/NEWS --- a/Misc/NEWS Thu Jan 12 17:00:32 2017 +0200 +++ b/Misc/NEWS Fri Jan 13 09:37:56 2017 +0200 @@ -23,6 +23,9 @@ Library ------- +- Issue #29219: Fixed infinite recursion in the repr of uninitialized + ctypes.CDLL instances. + - Issue #29082: Fixed loading libraries in ctypes by unicode names on Windows. Original patch by Chi Hsuan Yen.