classification
Title: ZipFile __del__/close problem with longint/long files
Type: behavior Stage: test needed
Components: Library (Lib) Versions: Python 3.1, Python 3.2, Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: alanmcintyre, amaury.forgeotdarc, kxroberto
Priority: normal Keywords:

Created on 2005-04-14 08:10 by kxroberto, last changed 2010-08-21 16:19 by amaury.forgeotdarc. This issue is now closed.

Messages (4)
msg60727 - (view) Author: kxroberto (kxroberto) Date: 2005-04-14 08:10
From a user (py2.3.4 based app) I got only this small
trace:
I cannot reproduce it easily:

  --- sync complete: 6 files (0+6), 3488210kB copied. 
  --- 1795.9 Seconds (100.0% CPU Time) 
  Exception exceptions.OverflowError: 'long int too
large to convert to int' in <bound method
ZipFile.__del__ of <zipfile.ZipFile instance at
0x009D9D50>> ignored


msg60728 - (view) Author: Alan McIntyre (alanmcintyre) * (Python committer) Date: 2005-04-14 20:17
Logged In: YES 
user_id=1115903

How do you reproduce it?  I have seen that exception pop up
when trying to add a file >2GB to an archive (although in
that case it occurred during the call to ZipFile.write
rather than __del__).  It looks to me like writing the
end-of-zip-archive record - during close(), which is called
by __del__() -  would give this exception if the contents of
the archive were > 2GB, but I haven't tried this out to be
sure.  If that's what's causing the problem, then it would
appear to me that it's just a limitation of the ZIP file
format, but maybe the ZipFile object could detect this and
raise a less cryptic exception.
msg60729 - (view) Author: Alan McIntyre (alanmcintyre) * (Python committer) Date: 2005-04-14 20:30
Logged In: YES 
user_id=1115903

Oh, silly me, I didn't notice this: "3488210kB copied,"
which is of course >2GB (don't know if your number indicates
pre- or post-compression though). I'm assuming this means
that you're bumping into the limits of the zip file format.

Since this sort of thing happens occasionally in some
applications I maintain, I will look at making a patch for
ZipFile that will at least tell you when you exceed file
format limits (either individual file size or total archive
file size).
msg114505 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2010-08-21 16:19
At the time, zipfile.py did not support the ZIP64 format...
History
Date User Action Args
2010-08-21 16:19:22amaury.forgeotdarcsetstatus: open -> closed

nosy: + amaury.forgeotdarc
messages: + msg114505

resolution: out of date
2010-08-21 13:47:14BreamoreBoysetversions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6
2009-02-15 22:16:23ajaksu2setstage: test needed
type: behavior
versions: + Python 2.6, - Python 2.3
2005-04-14 08:10:03kxrobertocreate