changeset: 106129:17ca7c4dd583 branch: 3.6 parent: 106122:7f7f1cbbf608 parent: 106127:d9a64d00a439 user: Serhiy Storchaka date: Fri Jan 13 09:42:17 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 7f7f1cbbf608 -r 17ca7c4dd583 Lib/ctypes/__init__.py --- a/Lib/ctypes/__init__.py Fri Jan 13 08:37:05 2017 +0200 +++ b/Lib/ctypes/__init__.py Fri Jan 13 09:42:17 2017 +0200 @@ -324,6 +324,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 7f7f1cbbf608 -r 17ca7c4dd583 Misc/NEWS --- a/Misc/NEWS Fri Jan 13 08:37:05 2017 +0200 +++ b/Misc/NEWS Fri Jan 13 09:42:17 2017 +0200 @@ -44,6 +44,9 @@ Library ------- +- Issue #29219: Fixed infinite recursion in the repr of uninitialized + ctypes.CDLL instances. + - Issue #28969: Fixed race condition in C implementation of functools.lru_cache. KeyError could be raised when cached function with full cache was simultaneously called from differen threads with the same uncached arguments.