Message179969
At the moment gzip can raise two errors on unexpected EOF: struct.error from struct.unpack() or TypeError from ord(). Both bz2 and lzma raise EOFError in such cases.
The proposed patch converts both truncated gzip errors to EOFError as for bz2 and lzma. Added similar tests for gzip, bz2 and lzma.
I doubt about backward compatibility. It's obvious that struct.error and TypeError are unintentional, and EOFError is purposed for this case. However users can catch undocumented but de facto exceptions and doesn't expect EOFError. |
|
Date |
User |
Action |
Args |
2013-01-14 19:03:16 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, loewis, calvin, ajaksu2, nadeem.vawda, yeeeev |
2013-01-14 19:03:15 | serhiy.storchaka | set | messageid: <1358190195.41.0.464608766177.issue1159051@psf.upfronthosting.co.za> |
2013-01-14 19:03:15 | serhiy.storchaka | link | issue1159051 messages |
2013-01-14 19:03:15 | serhiy.storchaka | create | |
|