Berker Peksag <berker.pek...@gmail.com> added the comment:
The OP's report is valid and they already stated that the file is malformed. More importantly, this can be reproduced with a valid ZIP file as well. The correct behavior is to get RuntimeError in this case. _check_compression() needs to be called before _get_decompressor(). There is no issue when getting the compressor object because _check_compression() is called inside _writecheck(). ---------- components: +Library (Lib) nosy: +berker.peksag, serhiy.storchaka resolution: not a bug -> stage: resolved -> patch review status: closed -> open _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36991> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com