You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rhpvordermanmannequin opened this issue
Mar 25, 2021
· 1 comment
Labels
3.7 (EOL)end of life3.8only security fixes3.9only security fixes3.10only security fixesstdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error
It now hrows EOFErrors when a stream is truncated. But this means that upstream both BadGzipFile and EOFError need to be catched in the exception handling when opening a gzip file for reading. When a gzip file is truncated it is also a "bad gzip file" in my opinion, so there is no reason to have an extra class of errors.
Also it throws zlib.error's when zlib craches for some reason. This means there is some corruption in the raw deflate block. Well that means it is a "bad gzip file" as well and the error message should reflect that.
This won't break people's code. If they are already catching EOFError zlib.error and BadGzipFile it changes nothing. If they only catch BadGzipFile, they will have less annoying errors that pop through.
I can make the PR, but of course not without any feedback. I am curious what other people think.
3.7 (EOL)end of life3.8only security fixes3.9only security fixes3.10only security fixesstdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: