Message145191
Yes, in 2.7 many parts of the stdlib relies on reference counting to close files. But 3.2 introduced a ResourceWarning which is emitted (in debug mode) each time a __del__ closes a valuable resource like a file or a socket. This was done exactly for this reason - help other implementations with a different garbage collector.
Now Lib/zipfile.py is probably much more gc-friendly: see how it uses a new member "close_fileobj", and the "with" statement in ZipFile.read().
PyPy will benefit of this when it migrates to 3.2; meanwhile, you could apply the same changes in pypy's own copy of zipfile.py. |
|
Date |
User |
Action |
Args |
2011-10-08 21:58:43 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, meador.inge, Valery.Khamenya |
2011-10-08 21:58:43 | amaury.forgeotdarc | set | messageid: <1318111123.36.0.0967907405063.issue13133@psf.upfronthosting.co.za> |
2011-10-08 21:58:42 | amaury.forgeotdarc | link | issue13133 messages |
2011-10-08 21:58:42 | amaury.forgeotdarc | create | |
|