Martin v. Löwis <mar...@v.loewis.de> added the comment: >> So as a way out, I propose that the ZipFile class gains a "strict" >> attribute, indicating whether "acceptable" violations of the spec >> are ignored or reported as exceptions. > > It is a not easy task (and unnecessary, I suppose). Now zipfile > ignores many errors (for example, it completely ignores local file > headers).
Why do you consider this difficult? Just add a "strict" flag, make it false by default, and raise an error if there is any unparsable extra data. I'm not asking that you implement a complete validity check for all aspects of the zip spec - just that there is a mode where it continues to raise an exception as it currently does (but with a better exception). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14315> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com