[pypy-issue] [issue1165] call to _RealGetContents from zipfile.py draws error in tests

Armin Rigo tracker at bugs.pypy.org
Mon Jun 11 11:40:16 CEST 2012


Armin Rigo <armin.rigo at gmail.com> added the comment:

This is a bug in odfpy, not in PyPy: in odf/opendocument.py line 409, in
write(), the opened ZipFile is never close()d.  It works on CPython because it
is closed automatically immediately, thanks to reference counting, and thus the
end of the zip file is written.  You don't have this effect with PyPy.  The fix
is to add "zipoutputfp.close()" in the end of the write() method.  If you can't
fix odfpy, a workaround is to do "import gc; gc.collect()" after the call to
write().

----------
nosy: +arigo
priority: performance bug -> bug
status: unread -> invalid

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1165>
________________________________________


More information about the pypy-issue mailing list