Bug 34

Title: fod2od fails on PyPy
Type: crash Severity: major
Components: opendocument Versions:
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: ced Nosy List: ced, roundup-bot
Priority: high Keywords: patch

Created on 2017-08-13 11:52 by ced, last changed 2017-08-31 22:50 by roundup-bot.

msg42 Author: [hidden] (ced) Date: 2017-08-13 11:52
The tests fail under PyPY with the traceback:

Traceback (most recent call last):
  File "/relatorio/relatorio/tests/", line 340,
in test_generate_fod
    oot = Template(source)
  File "/relatorio/relatorio/templates/",
line 237, in __init__
    encoding, lookup, allow_exec)
line 67, in __init__
"build/bdist.linux-x86_64/egg/genshi/template/", line
419, in __init__
    self._stream = self._parse(source, encoding)
  File "/relatorio/relatorio/templates/",
line 258, in _parse
    zf = get_zip_file(source)
  File "/relatorio/relatorio/templates/",
line 820, in get_zip_file
    return zipfile.ZipFile(fod2od(source))
  File "/usr/local/lib-python/2.7/", line 776, in
  File "/usr/local/lib-python/2.7/", line 819, in
    raise BadZipfile, "File is not a zip file"
BadZipfile: File is not a zip file
msg43 Author: [hidden] (ced) Date: 2017-08-13 11:56
Here is review43411002 that explicitly close the ZipFile
instead of relying on the gc.
msg44 Author: [hidden] (roundup-bot) Date: 2017-08-31 22:50
New changeset 370030d152b5 by C├ędric Krier in branch 'default':
Close ZipFile before returning the BytesIO
Date User Action Args
2017-08-31 22:50:32roundup-botsetstatus: open -> closed
nosy: + roundup-bot
messages: + msg44
2017-08-13 11:56:23cedsetstatus: new -> open
keywords: + patch
messages: + msg43
2017-08-13 11:52:50cedcreate