[Patches] [ python-Patches-1488881 ] tarfile.py: support for file-objects and bz2 (cp. #1488634)

SourceForge.net noreply at sourceforge.net
Mon May 15 21:31:08 CEST 2006


Patches item #1488881, was opened at 2006-05-15 14:18
Message generated for change (Comment added) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1488881&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.5
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Lars Gustäbel (gustaebel)
Assigned to: Nobody/Anonymous (nobody)
Summary: tarfile.py: support for file-objects and bz2 (cp. #1488634)

Initial Comment:
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.


----------------------------------------------------------------------

>Comment By: Georg Brandl (gbrandl)
Date: 2006-05-15 19:31

Message:
Logged In: YES 
user_id=849994

Committed in rev. 46005.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1488881&group_id=5470


More information about the Patches mailing list