This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients alanmcintyre, martin.panter, ned.deily, ronaldoussoren, serhiy.storchaka, twouters
Date 2016-05-14.23:18:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463267903.7.0.178052869231.issue24693@psf.upfronthosting.co.za>
In-reply-to
Content
I have hardly used the zipfile module, but here are my thoughts on some of the exceptions anyway :)

Some of these exceptions are documented, so the documentation would need updating.

BadZipFile for corrupted field seems reasonable.

The purpose of RuntimeError is not clearly documented, but I have the feeling it gets used mainly for programmer errors, rather than errors caused by external data. So I tend to agree a couple of the changes away from RuntimeError, such as the invalid password case.

For programmer errors, I doubt the exception type matters much for compatibility. RuntimeError seems fine to me, but I accept that ValueError is more consistent with open(..., mode="invalid"), operations on closed files, etc.
History
Date User Action Args
2016-05-14 23:18:23martin.pantersetrecipients: + martin.panter, twouters, ronaldoussoren, alanmcintyre, ned.deily, serhiy.storchaka
2016-05-14 23:18:23martin.pantersetmessageid: <1463267903.7.0.178052869231.issue24693@psf.upfronthosting.co.za>
2016-05-14 23:18:23martin.panterlinkissue24693 messages
2016-05-14 23:18:23martin.pantercreate