[issue1526] DeprecationWarning in zipfile.py while zipping 113000 files

2011-05-26 Thread Greg Steuck

Greg Steuck  added the comment:

There may be a related issue that I still hit with 2.6.5.

% cat /tmp/a.py 
import zipfile
import os

z = zipfile.ZipFile('/tmp/a.zip', 'w')
open("/tmp/a", "w")
os.utime("/tmp/a", (0,0))
z.write("/tmp/a", "a")
% python -V
Python 2.6.5
% uname -mo
x86_64 GNU/Linux
% uname -mor
2.6.32-gg426-generic x86_64 GNU/Linux
% python /tmp/a.py
/usr/lib/python2.6/zipfile.py:1047: DeprecationWarning: struct integer overflow 
masking is deprecated
  self.fp.write(zinfo.FileHeader())
/usr/lib/python2.6/zipfile.py:1047: DeprecationWarning: 'H' format requires 0 
<= number <= 65535
  self.fp.write(zinfo.FileHeader())
/usr/lib/python2.6/zipfile.py:1123: DeprecationWarning: struct integer overflow 
masking is deprecated
  self.close()
/usr/lib/python2.6/zipfile.py:1123: DeprecationWarning: 'H' format requires 0 
<= number <= 65535
  self.close()

--
nosy: +gnezdo

___
Python tracker 
<http://bugs.python.org/issue1526>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12198] zipfile.py:1047: DeprecationWarning: 'H' format requires 0 <= number <= 65535

2011-05-27 Thread Greg Steuck

New submission from Greg Steuck :

zipfile.py displays warning when trying to write files timestamped before 1980.

% cat /tmp/a.py
import zipfile
import os

z = zipfile.ZipFile('/tmp/a.zip', 'w')
open("/tmp/a", "w")
os.utime("/tmp/a", (0,0))
z.write("/tmp/a", "a")
% python -V
Python 2.6.5
% uname -mo
x86_64 GNU/Linux
% uname -mor
2.6.32-gg426-generic x86_64 GNU/Linux
% python /tmp/a.py
/usr/lib/python2.6/zipfile.py:1047: DeprecationWarning: struct integer overflow 
masking is deprecated
 self.fp.write(zinfo.FileHeader())
/usr/lib/python2.6/zipfile.py:1047: DeprecationWarning: 'H' format requires 0 
<= number <= 65535
 self.fp.write(zinfo.FileHeader())
/usr/lib/python2.6/zipfile.py:1123: DeprecationWarning: struct integer overflow 
masking is deprecated
 self.close()
/usr/lib/python2.6/zipfile.py:1123: DeprecationWarning: 'H' format requires 0 
<= number <= 65535
 self.close()

Similar to, but different from http://bugs.python.org/issue1526.

Amaury Forgeot d'Arc says:

The ZIP file format is unable to store dates before 1980.  With version 3.2, 
your script even raises an exception.  Please file this in a different issue.

--
components: Library (Lib)
messages: 137093
nosy: gnezdo
priority: normal
severity: normal
status: open
title: zipfile.py:1047: DeprecationWarning: 'H' format requires 0 <= number <= 
65535
type: behavior
versions: Python 2.6

___
Python tracker 
<http://bugs.python.org/issue12198>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com