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.

classification
Title: zipfile appends broken in 2.5b1
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: krumms
Priority: normal Keywords:

Created on 2006-07-06 02:03 by krumms, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python_bug.tar.gz krumms, 2006-07-06 02:03 Test case
Messages (2)
msg29057 - (view) Author: Thomas Lee (krumms) (Python committer) Date: 2006-07-06 02:03
Discovered this while implementing a patch for 1514451.
It doesn't matter if compression is used or not, the
bug occurs either way. Test case attached. Output as below:

tom@chip:~/python_bug$ ls
bug.py  file_a.txt  file_c.txt
tom@chip:~/python_bug$ python -V
Python 2.4.3
tom@chip:~/python_bug$ python bug.py
file a
file b
file c
file d
tom@chip:~/python_bug$ python2.5 -V
Python 2.5b1
tom@chip:~/python_bug$ python2.5 bug.py
file a
file b
Traceback (most recent call last):
  File "bug.py", line 16, in <module>
    print f.read('file_c.txt').strip()
  File "/usr/local/python2.5/lib/python2.5/zipfile.py",
line 482, in read
    raise BadZipfile, "Bad magic number for file header"
zipfile.BadZipfile: Bad magic number for file header
tom@chip:~/python_bug$
msg29058 - (view) Author: Thomas Lee (krumms) (Python committer) Date: 2006-07-06 02:10
Logged In: YES 
user_id=315535

*sighs* I had local modifications that I forgot to remove
before testing this bug. Sorry.
History
Date User Action Args
2022-04-11 14:56:18adminsetgithub: 43620
2006-07-06 02:03:12krummscreate