summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/ctypes/__init__.py4
-rw-r--r--Misc/NEWS3
2 files changed, 7 insertions, 0 deletions
diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py
index 1c9d3a5..f870968 100644
--- a/Lib/ctypes/__init__.py
+++ b/Lib/ctypes/__init__.py
@@ -324,6 +324,10 @@ class CDLL(object):
"""
_func_flags_ = _FUNCFLAG_CDECL
_func_restype_ = c_int
+ # default values for repr
+ _name = '<uninitialized>'
+ _handle = 0
+ _FuncPtr = None
def __init__(self, name, mode=DEFAULT_MODE, handle=None,
use_errno=False,
diff --git a/Misc/NEWS b/Misc/NEWS
index 3b84dd7..1996b3f 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -44,6 +44,9 @@ Core and Builtins
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.