[issue14315] zipfile.ZipFile() unable to open zip File with a short extra header

2018-08-06 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Just for information: the padding in APK files is added by the zipalign utility 
[1].

[1] https://developer.android.com/studio/command-line/zipalign

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14315] zipfile.ZipFile() unable to open zip File with a short extra header

2014-05-30 Thread Gregory P. Smith

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