Author serhiy.storchaka
Recipients ajaksu2, calvin, loewis, nadeem.vawda, serhiy.storchaka, yeeeev
Date 2013-01-14.19:03:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1358190195.41.0.464608766177.issue1159051@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-01-14 19:03:16serhiy.storchakasetrecipients: + serhiy.storchaka, loewis, calvin, ajaksu2, nadeem.vawda, yeeeev
2013-01-14 19:03:15serhiy.storchakasetmessageid: <1358190195.41.0.464608766177.issue1159051@psf.upfronthosting.co.za>
2013-01-14 19:03:15serhiy.storchakalinkissue1159051 messages
2013-01-14 19:03:15serhiy.storchakacreate