Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tarfile module fails to correctly parse some .tar.gz archives?! #48468

Closed
gerhardxXx mannequin opened this issue Oct 28, 2008 · 3 comments
Closed

tarfile module fails to correctly parse some .tar.gz archives?! #48468

gerhardxXx mannequin opened this issue Oct 28, 2008 · 3 comments
Labels
extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error

Comments

@gerhardxXx
Copy link
Mannequin

gerhardxXx mannequin commented Oct 28, 2008

BPO 4218
Nosy @gustaebel, @vstinner
Files
  • dir.tar.gz: example file that is not correctly processed by tarfile module
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2008-10-28.18:19:00.381>
    created_at = <Date 2008-10-28.15:12:11.948>
    labels = ['extension-modules', 'type-bug']
    title = 'tarfile module fails to correctly parse some .tar.gz archives?!'
    updated_at = <Date 2008-10-28.18:19:00.372>
    user = 'https://bugs.python.org/gerhardxXx'

    bugs.python.org fields:

    activity = <Date 2008-10-28.18:19:00.372>
    actor = 'lars.gustaebel'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-10-28.18:19:00.381>
    closer = 'lars.gustaebel'
    components = ['Extension Modules']
    creation = <Date 2008-10-28.15:12:11.948>
    creator = 'gerhard_xXx'
    dependencies = []
    files = ['11899']
    hgrepos = []
    issue_num = 4218
    keywords = []
    message_count = 3.0
    messages = ['75284', '75285', '75300']
    nosy_count = 3.0
    nosy_names = ['lars.gustaebel', 'vstinner', 'gerhard_xXx']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue4218'
    versions = ['Python 2.4']

    @gerhardxXx
    Copy link
    Mannequin Author

    gerhardxXx mannequin commented Oct 28, 2008

    hi,

    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 = tarfile.open('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.

    @gerhardxXx gerhardxXx mannequin added extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error labels Oct 28, 2008
    @vstinner
    Copy link
    Member

    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?

    @gustaebel
    Copy link
    Mannequin

    gustaebel mannequin commented Oct 28, 2008

    This is a known bug in Python 2.4's tarfile version (cp. bpo-1509889
    and bpo-1719898). It was fixed in Python 2.5. Thank you anyway for your
    report.

    @gustaebel gustaebel mannequin closed this as completed Oct 28, 2008
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant