Gregory P. Smith added the comment: This was never an enhancement. zipfile was failing to properly deal with real world data that other zip file tools on the planet were perfectly happy to deal with. That's a bug. Fixed.
Practicality beats purity. Be lenient in what you accept. The zipfile module is not meant to be a zip "standard" validation tool. The other discussions in this bug about adding actual features such as a "strict" mode flag could be done but should really go in feature requests of their own. The zipfile module is... not a wonderful body of code (understatement). Example: It is still quite possible to get non zipfile.BadZipFile exceptions such as struct.error based on various arrangements of input data. ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith resolution: -> fixed stage: test needed -> resolved status: open -> closed title: zipfile.ZipFile() unable to open zip File -> zipfile.ZipFile() unable to open zip File with a short extra header type: enhancement -> behavior versions: +Python 2.7, Python 3.4, Python 3.5 -Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14315> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com