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: tarfile doesn't support multistream bzipped tar files
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: brian.curtin Nosy List: adelfino, brian.curtin, docs@python, lars.gustaebel, nadeem.vawda, neologix, petri.lehtinen, sengels, serhiy.storchaka
Priority: high Keywords: patch

Created on 2011-11-15 10:29 by sengels, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 8428 merged adelfino, 2018-07-23 22:56
Messages (9)
msg147663 - (view) Author: (sengels) Date: 2011-11-15 10:29
This bug seems to be related to http://bugs.python.org/issue13158

When I try to run the following code:

import tarfile

tf = tarfile.open("kdelibs-4.7.3.tar.bz2", "r")
print(len(tf.getnames()))

against this tarball: http://www.winkde.org/pub/kde/ports/win32/repository/other/kdelibs-4.7.3.tar.bz2 it will output 150 members. This is not enough and other tools like 7zip or bsdtar report a lot more (should be around 9237).
msg147675 - (view) Author: Lars Gustäbel (lars.gustaebel) * (Python committer) Date: 2011-11-15 14:41
Some testing reveals that the bz2 module < 3.3 cannot fully decompress the file in question. Only the first 900k are decompressed. Thus, this issue is not related to issue13158 or the tarfile module.
msg147676 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2011-11-15 14:45
Isn't this a duplicate of issue #1625?
msg235676 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-02-10 09:12
The tarfile module documentation needs a note similar to issue1625 which would warn about the lack of supporting some files and suggest a workaround.
msg322236 - (view) Author: Andrés Delfino (adelfino) * (Python triager) Date: 2018-07-23 17:56
This is no longer reproducible under 3.7.0.

>>> import tarfile
>>> tf = tarfile.open("kdelibs-4.7.3.tar.bz2", "r")
>>> print(len(tf.getnames()))
9237

Not sure I should be the one closing this.
msg322243 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-07-23 18:54
This is a 2.7 only documentation issue.
msg322244 - (view) Author: Andrés Delfino (adelfino) * (Python triager) Date: 2018-07-23 19:00
Sorry, you are right. I'll try on 2.7 when I get home, and make a PR if needed.
msg326687 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2018-09-29 16:57
New changeset 8d3b0f49021e6cd25030a1eb979218cfceb44061 by Brian Curtin (Andrés Delfino) in branch '2.7':
[2.7] bpo-13407: Mention that bz2/tarfile doesn't support multi-stream bzip2 files (GH-8428)
https://github.com/python/cpython/commit/8d3b0f49021e6cd25030a1eb979218cfceb44061
msg326696 - (view) Author: Andrés Delfino (adelfino) * (Python triager) Date: 2018-09-30 02:03
I believe this can be closed.
History
Date User Action Args
2022-04-11 14:57:23adminsetgithub: 57616
2018-10-08 14:59:35brian.curtinsetstatus: open -> closed
assignee: docs@python -> brian.curtin
resolution: fixed
stage: patch review -> resolved
2018-09-30 02:04:09adelfinosettype: enhancement
2018-09-30 02:03:50adelfinosetmessages: + msg326696
2018-09-29 16:57:39brian.curtinsetnosy: + brian.curtin
messages: + msg326687
2018-07-23 22:56:46adelfinosetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request7954
2018-07-23 19:00:29adelfinosetmessages: + msg322244
2018-07-23 18:54:22serhiy.storchakasetmessages: + msg322243
2018-07-23 17:56:09adelfinosetnosy: + adelfino
messages: + msg322236
2015-02-10 09:12:41serhiy.storchakasetstatus: pending -> open


assignee: docs@python
stage: needs patch
title: tarfile.getnames misses members again -> tarfile doesn't support multistream bzipped tar files
nosy: + serhiy.storchaka, nadeem.vawda, docs@python
versions: - Python 3.2
messages: + msg235676
priority: normal -> high
components: + Documentation
2014-10-02 17:58:05serhiy.storchakasetstatus: open -> pending
2011-11-19 10:56:59petri.lehtinensetnosy: + petri.lehtinen
2011-11-15 14:45:25neologixsetnosy: + neologix
messages: + msg147676
2011-11-15 14:41:35lars.gustaebelsetnosy: + lars.gustaebel
messages: + msg147675
2011-11-15 10:30:19sengelssettitle: tarfile.getmembers misses members again -> tarfile.getnames misses members again
2011-11-15 10:29:20sengelscreate