Message101907
Now that WeakSet has been backported to trunk, I've backported the fix for this reference-leak (patch with test case attached).
However, after making the patch, I discovered that old-style classes are not weak-referenceable. Consequently, the patch is not suitable for commiting.
If old-style classes can be made weak-referenceable, then the patch should work. If not, then this bug is essentially impossible to solve in 2.x unless the ABC cache is done away with entirely.
Other notes:
Since abc.py is imported during bootstrapping before paths are set up, I needed to add _weakref as a built-in module. (It's already a built-in module in the py3k branch.)
Since the patch tweaks Modules/Setup.dist, you need to "make distclean" and rerun ./configure after applying the patch.
Also, on unpatched trunk the example posted by Amaury no longer seems to trigger the issue. However, the example I posted in Issue 8022 still triggers the leak. I used that as the basis for the test case in the patch. |
|
Date |
User |
Action |
Args |
2010-03-29 22:21:36 | stutzbach | set | recipients:
+ stutzbach, amaury.forgeotdarc, pitrou, ajaksu2, flox |
2010-03-29 22:21:36 | stutzbach | set | messageid: <1269901296.71.0.755179068212.issue2521@psf.upfronthosting.co.za> |
2010-03-29 22:21:34 | stutzbach | link | issue2521 messages |
2010-03-29 22:21:34 | stutzbach | create | |
|