Gustavo J. A. M. Carneiro added the comment:

I have narrowed it down to one line of code:
ctypes.create_string_buffer(16)

That is enough to create 7 objects that have reference cycles.

[<class 'ctypes.c_char_Array_16'>, {'__module__': 'ctypes', '__doc__': None, 
'__weakref__': <attribute '__weakref__' of 'c_char_Array_16' objects>, 'raw': 
<attribute 'raw' of 'c_char_Array_16' objects>, '_length_': 16, '_type_': 
<class 'ctypes.c_char'>, 'value': <attribute 'value' of 'c_char_Array_16' 
objects>, '__dict__': <attribute '__dict__' of 'c_char_Array_16' objects>}, 
(<class 'ctypes.c_char_Array_16'>, <class '_ctypes.Array'>, <class 
'_ctypes._CData'>, <class 'object'>), <attribute '__weakref__' of 
'c_char_Array_16' objects>, <attribute 'raw' of 'c_char_Array_16' objects>, 
<attribute 'value' of 'c_char_Array_16' objects>, <attribute '__dict__' of 
'c_char_Array_16' objects>]

So maybe the bug is in ctypes itself, not the uuid module.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20519>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to