Serhiy Storchaka added the comment:

decompress() is affected too.

>>> import bz2
>>> bz2.decompress(bz2.compress(b'abcd') + b'xyz')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/serhiy/py/cpython/Lib/bz2.py", line 505, in decompress
    results.append(decomp.decompress(data))
OSError: Invalid data stream

On 3.2 it returns b'abcd'.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19839>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to