Issue 1488881: tarfile.py: support for file-objects and bz2 (cp. #1488634) (original) (raw)

Issue1488881

Created on 2006-05-15 14:18 by lars.gustaebel, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
tarfile-bzip2.diff lars.gustaebel,2006-05-15 14:18 patch against tarfile.py and test_tarfile.py
Messages (2)
msg50246 - (view) Author: Lars Gustäbel (lars.gustaebel) * (Python committer) Date: 2006-05-15 14:18
This patch adds support for file(-like) objects and bzip2 compression to tarfile.py. It works around the limitation of the bz2 module that you cannot create a BZ2File object from a file or file-like object but from a filename only. Bug #1488634 reminded me that I had this workaround in my development version of tarfile.py since last year. I think it would generally be a good addition for stdlib's tarfile.py, and would solve the OP's problem as a side-effect. The patch adds a class _BZ2Proxy to Lib/tarfile.py and adds tests for this feature to Lib/test/test_tarfile.py.
msg50247 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-05-15 19:31
Logged In: YES user_id=849994 Committed in rev. 46005.
History
Date User Action Args
2022-04-11 14:56:17 admin set github: 43359
2006-05-15 14🔞24 lars.gustaebel create