changeset: 106127:d9a64d00a439 branch: 3.5 parent: 106121:f473fba49f1a 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 f473fba49f1a -r d9a64d00a439 Lib/ctypes/__init__.py --- a/Lib/ctypes/__init__.py Fri Jan 13 08:34:34 2017 +0200 +++ b/Lib/ctypes/__init__.py Fri Jan 13 09:37:56 2017 +0200 @@ -327,6 +327,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 f473fba49f1a -r d9a64d00a439 Misc/NEWS --- a/Misc/NEWS Fri Jan 13 08:34:34 2017 +0200 +++ b/Misc/NEWS Fri Jan 13 09:37:56 2017 +0200 @@ -13,6 +13,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.