[issue12142] Reference cycle when importing ctypes

2021-12-09 Thread Eryk Sun
Eryk Sun added the comment: The _ctypes extension module could have a dict that maps each format code to its (size, alignment), based on `formattable`. Then direct size comparisons wouldn't be limited to types defined by the struct module, and it wouldn't be necessary to create c_longdouble

[issue12142] Reference cycle when importing ctypes

2021-12-09 Thread Irit Katriel
Irit Katriel added the comment: Looks like the long double issue is still there in 3.11 >>> import gc >>> gc.set_debug(gc.DEBUG_LEAK) >>> import ctypes gc: collectable gc: collectable gc: collectable gc: collectable gc: collectable gc: collectable gc: collectable gc: collectable gc:

[issue12142] Reference cycle when importing ctypes

2012-06-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Meador, can we close this issue? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12142 ___

[issue12142] Reference cycle when importing ctypes

2012-06-28 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: Meador, can we close this issue? I wanted to keep it open until the 'long double' problem is fixed as well. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12142

[issue12142] Reference cycle when importing ctypes

2012-02-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 205da7a19a78 by Meador Inge in branch '3.2': Issue #12142: Fixed reference cycle when importing ctypes http://hg.python.org/cpython/rev/205da7a19a78 New changeset b228d9da8bd3 by Meador Inge in branch 'default':

[issue12142] Reference cycle when importing ctypes

2012-02-03 Thread poq
poq p...@gmx.com added the comment: I've attached a patch for the _array_type change. The long double fix is probably dependent on PEP3118 (#3132). -- keywords: +patch Added file: http://bugs.python.org/file24413/ctypes-leak.patch ___ Python tracker

[issue12142] Reference cycle when importing ctypes

2012-02-03 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12142 ___ ___ Python-bugs-list

[issue12142] Reference cycle when importing ctypes

2011-07-10 Thread Vlad Riscutia
Vlad Riscutia riscutiav...@gmail.com added the comment: I ran full test suit after making the _array_type = type(Array) change and everything passes. I also took a look at this and found additional leak. gc shows this as garbage: [(class '_ctypes._SimpleCData',), class 'ctypes.c_longdouble',

[issue12142] Reference cycle when importing ctypes

2011-05-31 Thread poq
poq p...@gmx.com added the comment: Tests succeed with this change. There is only one use of _array_type, which is in the same module. This use is presumably tested, because the test fails if I change the line to _array_type = type(Structure). In fact, everything must behave exactly the same

[issue12142] Reference cycle when importing ctypes

2011-05-31 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Thank you for the test and explanation. There currently is no specific cytpes maintainer. But from what you have said, I might feel comfortable enough applying this, if no one else does, when I have the necessary setup on a new machine.

[issue12142] Reference cycle when importing ctypes

2011-05-28 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: If you are able to rebuild Python, have you tried running the ctypes test after rebuilding with this change? And, does the test cover the internal uses of _array_type? -- nosy: +terry.reedy ___

[issue12142] Reference cycle when importing ctypes

2011-05-21 Thread poq
Changes by poq p...@gmx.com: -- title: eference cycle when importing ctypes - Reference cycle when importing ctypes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12142 ___