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.

Title: tarfile module fails to correctly parse some .tar.gz archives?!
Type: behavior Stage:
Components: Extension Modules Versions: Python 2.4
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: gerhard_xXx, lars.gustaebel, vstinner
Priority: normal Keywords:

Created on 2008-10-28 15:12 by gerhard_xXx, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
dir.tar.gz gerhard_xXx, 2008-10-28 15:12 example file that is not correctly processed by tarfile module
Messages (3)
msg75284 - (view) Author: (gerhard_xXx) Date: 2008-10-28 15:12

seems like tarfile module for python 2.4 is broken.
If I open the attached dir.tar.gz (tried it on different machines) then
tarfile module only displays a part of the contents.

what I did:
>>> import tarfile
>>> f ='dir.tar.gz','r:gz')
>>> f.getnames()

getnames() only returns the files/directories in the dir.tar.gz that
start with letter "a-j" and skips the rest???!!

cheers gerhard

More info (I have debian etch installation):
Python 2.4.4 (#2, Apr 16 2008, 17:58:59)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2

$ tar --version
tar (GNU tar) 1.16
Copyright (C) 2006 Free Software Foundation, Inc.
msg75285 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2008-10-28 15:16
The bug is fixed in Python 2.5. Since Python 2.6 was released the 1st 
October, why not upgrading to 2.6 or at least 2.5?
msg75300 - (view) Author: Lars Gustäbel (lars.gustaebel) * (Python committer) Date: 2008-10-28 18:19
This is a known bug in Python 2.4's tarfile version (cp. issue1509889
and issue1719898). It was fixed in Python 2.5. Thank you anyway for your
Date User Action Args
2022-04-11 14:56:40adminsetgithub: 48468
2008-10-28 18:19:00lars.gustaebelsetstatus: open -> closed
resolution: duplicate
messages: + msg75300
nosy: + lars.gustaebel
2008-10-28 15:16:06vstinnersetnosy: + vstinner
messages: + msg75285
2008-10-28 15:12:12gerhard_xXxcreate