[pypy-issue] [issue1299] BZ2Decompressor.decompress('') does not raise EOFError at end-of-stream
tracker at bugs.pypy.org
Sun Oct 21 17:58:13 CEST 2012
New submission from Nadeem Vawda <nadeem.vawda at gmail.com>:
In CPython, the BZ2Decompressor.decompress method raises EOFError if the end of
the compressed stream has been reached. This can be useful, as it allows the
caller to determine whether end-of-stream has been reached without affecting the
decompressor's internal state. However, in PyPy 1.9, no exception is raised if
the input data is of length 0, so this trick cannot be used.
The attached patch changes PyPy's behavior in this case to match CPython.
nosy: nadeem.vawda, pypy-issue
title: BZ2Decompressor.decompress('') does not raise EOFError at end-of-stream
PyPy bug tracker <tracker at bugs.pypy.org>
More information about the pypy-issue