[Python-bugs-list] [ python-Bugs-683061 ] gzip module cannot write large files

SourceForge.net noreply at sourceforge.net
Wed Sep 24 19:36:34 EDT 2003


Bugs item #683061, was opened at 2003-02-08 11:52
Message generated for change (Comment added) made by bcannon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=683061&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Ben Escoto (bescoto)
Assigned to: Nobody/Anonymous (nobody)
Summary: gzip module cannot write large files

Initial Comment:
Something like this:



import gzip

fin = open("/dev/urandom", "rb")

fout = gzip.GzipFile("out", "wb")

for i in range(4500): fout.write(fin.read(1024*1024))

fout.close()



will result in an error like:



Exception 'long int too large to convert to int' raised

of class 'exceptions.OverflowError':

...

  File "/usr/local/lib/python2.2/gzip.py", line 253, in

close

    write32(self.fileobj, self.size)

  File "/usr/local/lib/python2.2/gzip.py", line 19, in

write32

    output.write(struct.pack("<l", value))



Tested in python 2.2.1



----------------------------------------------------------------------

>Comment By: Brett Cannon (bcannon)
Date: 2003-09-24 16:36

Message:
Logged In: YES 
user_id=357491

No one ever said 2.2.3 was the final release of the 2.2 branch.  

There was talk just last month about a 2.2.4 release towards the 

end of the year.

----------------------------------------------------------------------

Comment By: Michael Bartl (midramas)
Date: 2003-09-24 16:09

Message:
Logged In: YES 
user_id=31511

I'd propose to close this bug (fixed in the 2.3 series).



The fix can't be backported, because 2.2.3 was the final

version of the 2.2 series.

----------------------------------------------------------------------

Comment By: Brett Cannon (bcannon)
Date: 2003-05-28 18:20

Message:
Logged In: YES 
user_id=357491

>From what I can gather from cvs log this was not backported.  Should it be?

----------------------------------------------------------------------

Comment By: Steven Taschuk (staschuk)
Date: 2003-03-30 10:42

Message:
Logged In: YES 
user_id=666873

Current CVS has a fix for this, as of revision 1.37 (part of 2.3a1).



See patch 618135: http://www.python.org/sf/618135.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=683061&group_id=5470



More information about the Python-bugs-list mailing list