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.open with mode w|bz2
Type: Stage:
Components: Extension Modules Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: felixwiemann, loewis
Priority: normal Keywords:

Created on 2004-08-22 17:32 by felixwiemann, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg22170 - (view) Author: Felix Wiemann (felixwiemann) Date: 2004-08-22 17:32
tarfile.open with mode='w|bz2' only creates empty
files. How to reproduce:

1. Create a file 'test' with some random content.

2. Execute the following Python code:

import tarfile
gz = tarfile.open('test.tar.gz', 'w|gz')
gz.add('test')
gz.close()
bz2 = tarfile.open('test.tar.bz2', 'w|bz2')
bz2.add('test')
bz2.close()

3. Look at test.tar.*

test.tar.gz has been created correctly, but
test.tar.bz2 is empty (0 bytes).

Reproducible with both Python 2.3.3 and Python 2.4a2.
msg22171 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-08-22 21:30
Logged In: YES 
user_id=21627

Thanks for the report. Fixed in 

tarfile.py 1.18
test_tarfile.py 1.14
tarfile.py 1.8.12.3
NEWS 1.831.4.145
History
Date User Action Args
2022-04-11 14:56:06adminsetgithub: 40803
2004-08-22 17:32:28felixwiemanncreate