Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-6584: Add a BadGzipFile exception to the gzip module #13022

Merged

Conversation

ZackerySpytz
Copy link
Contributor

@ZackerySpytz ZackerySpytz commented Apr 30, 2019

Co-Authored-By: Filip Gruszczyński gruszczy@gmail.com
Co-Authored-By: Michele Orrù maker@tumbolandia.net

https://bugs.python.org/issue6584

Co-Authored-By: Filip Gruszczyński <gruszczy@gmail.com>
Co-Authored-By: Michele Orrù <maker@tumbolandia.net>
@ZackerySpytz
Copy link
Contributor Author

EOFError can be raised in some cases in the gzip module, and this was added to match with
bz2 and lzma (https://bugs.python.org/issue1159051 / cc0172c). I don't think these cases should be replaced with BadGzipFile.

@serhiy-storchaka
Copy link
Member

It should be documented clearly that BadGzipFile is not the only exception raised by corrupted gzip files. EOFError and zlib.error also can be raised.

@ZackerySpytz
Copy link
Contributor Author

@serhiy-storchaka Thank you for your comment, Serhiy! EOFError and zlib.error are now mentioned in the gzip documentation. Please take a look.

@csabella
Copy link
Contributor

@serhiy-storchaka, is this ready to be merged? Thanks!

@serhiy-storchaka serhiy-storchaka merged commit cf599f6 into python:master May 13, 2019
@serhiy-storchaka
Copy link
Member

It was ready to merged. I just gave a chance to other core devs to make a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants