Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Do not close external file objects passed to tarfile.open(mode='w:bz2') | Lars Gustäbel | 2008-05-27 | 1 | -1/+0 |
| | | | | when the TarFile is closed. | ||||
* | A stab in the dark attempt to fix the alpha/tru64 buildbot problem and add more | Gregory P. Smith | 2008-03-25 | 1 | -2/+2 |
| | | | | test coverage of valid inputs to zlib.crc32. | ||||
* | Issue #2004: Use mode 0700 for temporary directories and default | Lars Gustäbel | 2008-02-05 | 1 | -9/+9 |
| | | | | | | permissions for missing directories. (will backport to 2.5) | ||||
* | Issue #1735: TarFile.extractall() now correctly sets | Lars Gustäbel | 2008-01-04 | 1 | -4/+4 |
| | | | | | | directory permissions and times. (will backport to 2.5) | ||||
* | Issue #1531: Read fileobj from the current offset, do not seek to | Lars Gustäbel | 2007-12-01 | 1 | -1/+2 |
| | | | | | | the start. (will backport to 2.5) | ||||
* | TarFile.__init__() no longer fails if no name argument is passed and | Lars Gustäbel | 2007-08-28 | 1 | -1/+1 |
| | | | | | | the fileobj argument has no usable name attribute (e.g. StringIO). (will backport to 2.5) | ||||
* | Added exclude keyword argument to the TarFile.add() method. | Lars Gustäbel | 2007-06-18 | 1 | -4/+10 |
| | |||||
* | Added errors argument to TarFile class that allows the user to | Lars Gustäbel | 2007-05-27 | 1 | -101/+134 |
| | | | | | | | | | | | | | | | | | | | | specify an error handling scheme for character conversion. Additional scheme "utf-8" in read mode. Unicode input filenames are now supported by design. The values of the pax_headers dictionary are now limited to unicode objects. Fixed: The prefix field is no longer used in PAX_FORMAT (in conformance with POSIX). Fixed: In read mode use a possible pax header size field. Fixed: Strip trailing slashes from pax header name values. Fixed: Give values in user-specified pax_headers precedence when writing. Added unicode tests. Added pax/regtype4 member to testtar.tar all possible number fields in a pax header. Added two chapters to the documentation about the different formats tarfile.py supports and how unicode issues are handled. | ||||
* | Remove direct call's to file's constructor and replace them with calls to | Brett Cannon | 2007-05-25 | 1 | -4/+5 |
| | | | | open() as ths is considered best practice. | ||||
* | This is the implementation of POSIX.1-2001 (pax) format read/write | Lars Gustäbel | 2007-03-13 | 1 | -334/+646 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | support. The TarInfo class now contains all necessary logic to process and create tar header data which has been moved there from the TarFile class. The fromtarfile() method was added. The new path and linkpath properties are aliases for the name and linkname attributes in correspondence to the pax naming scheme. The TarFile constructor and classmethods now accept a number of keyword arguments which could only be set as attributes before (e.g. dereference, ignore_zeros). The encoding and pax_headers arguments were added for pax support. There is a new tarinfo keyword argument that allows using subclassed TarInfo objects in TarFile. The boolean TarFile.posix attribute is deprecated, because now three tar formats are supported. Instead, the desired format for writing is specified using the constants USTAR_FORMAT, GNU_FORMAT and PAX_FORMAT as the format keyword argument. This change affects TarInfo.tobuf() as well. The test suite has been heavily reorganized and partially rewritten. A new testtar.tar was added that contains sample data in many formats from 4 different tar programs. Some bugs and quirks that also have been fixed: Directory names do no longer have a trailing slash in TarInfo.name or TarFile.getnames(). Adding the same file twice does not create a hardlink file member. The TarFile constructor does no longer need a name argument. The TarFile._mode attribute was renamed to mode and contains either 'r', 'w' or 'a'. | ||||
* | Patch #1652681: create nonexistent files in append mode and | Lars Gustäbel | 2007-02-06 | 1 | -2/+7 |
| | | | | allow appending to empty files. | ||||
* | Patch #1507247: tarfile.py: use current umask for intermediate | Lars Gustäbel | 2007-01-23 | 1 | -13/+1 |
| | | | | directories. | ||||
* | Patch #1504073: Fix tarfile.open() for mode "r" with a fileobj argument. | Lars Gustäbel | 2006-12-27 | 1 | -0/+4 |
| | | | | Will backport to 2.5. | ||||
* | Patch #1262036: Prevent TarFiles from being added to themselves under | Lars Gustäbel | 2006-12-23 | 1 | -27/+6 |
| | | | | | | certain conditions. Will backport to 2.5. | ||||
* | Patch #1230446: tarfile.py: fix ExFileObject so that read() and tell() | Lars Gustäbel | 2006-12-23 | 1 | -106/+153 |
| | | | | | | work correctly together with readline(). Will backport to 2.5. | ||||
* | Testcase for patch #1484695. | Georg Brandl | 2006-12-20 | 1 | -6/+5 |
| | |||||
* | Patch #1484695: The tarfile module now raises a HeaderError exception | Georg Brandl | 2006-12-19 | 1 | -10/+17 |
| | | | | if a buffer given to frombuf() is invalid. | ||||
* | Patch #1610437: fix a tarfile bug with long filename headers. | Georg Brandl | 2006-12-06 | 1 | -2/+6 |
| | |||||
* | Patch #1583880: fix tarfile's problems with long names and posix/ | Georg Brandl | 2006-10-29 | 1 | -88/+81 |
| | | | | GNU modes. | ||||
* | Patch [ 1583506 ] tarfile.py: 100-char filenames are truncated | Georg Brandl | 2006-10-24 | 1 | -1/+1 |
| | |||||
* | Fix tarfile depending on buggy int('1\0', base) behavior. | Georg Brandl | 2006-10-12 | 1 | -1/+1 |
| | |||||
* | Fix bug #1543303, tarfile adds padding that breaks gunzip. | Neal Norwitz | 2006-08-21 | 1 | -3/+0 |
| | | | | | | Patch # 1543897. Will backport to 2.5 | ||||
* | _Stream.close(): Try to kill struct.pack() warnings when | Tim Peters | 2006-08-02 | 1 | -1/+7 |
| | | | | | | | | | | writing the crc to file on the "PPC64 Debian trunk" buildbot when running test_tarfile. This is again a case where the native zlib crc is an unsigned 32-bit int, but the Python wrapper implicitly casts it to signed C long, so that "the sign bit looks different" on different platforms. | ||||
* | Part of SF patch #1484695. This removes dead code. The chksum was | Neal Norwitz | 2006-07-10 | 1 | -7/+0 |
| | | | | | | already verified in .frombuf() on the lines above. If there was a problem an exception is raised, so there was no way this condition could have been true. | ||||
* | Always close BZ2Proxy object. Remove unnecessary struct usage. | Georg Brandl | 2006-05-27 | 1 | -13/+10 |
| | |||||
* | Whitespace normalization. | Tim Peters | 2006-05-19 | 1 | -1/+1 |
| | |||||
* | Amendments to patch #1484695. | Georg Brandl | 2006-05-18 | 1 | -45/+52 |
| | |||||
* | [ 1488881 ] tarfile.py: support for file-objects and bz2 (cp. #1488634) | Georg Brandl | 2006-05-15 | 1 | -2/+67 |
| | |||||
* | Patch #1484695: Update the tarfile module to version 0.8. This fixes | Georg Brandl | 2006-05-10 | 1 | -180/+200 |
| | | | | | a couple of issues, notably handling of long file names using the GNU LONGNAME extension. | ||||
* | Patch #1338314, Bug #1336623: fix tarfile so it can extract | Neal Norwitz | 2005-10-28 | 1 | -5/+6 |
| | | | | | | REGTYPE directories from tarfiles written by old programs. Will backport. | ||||
* | Fix SF bug # 1330039, patch # 1331635 from Lars Gustaebel (tarfile maintainer) | Neal Norwitz | 2005-10-20 | 1 | -1/+2 |
| | | | | | | | | | | | | | | Problem: if two files are assigned the same inode number by the filesystem, the second one will be added as a hardlink to the first, which means that the content will be lost. The patched code checks if the file's st_nlink is greater 1. So only for files that actually have several links pointing to them hardlinks will be created, which is what GNU tar does. Will backport. | ||||
* | Minor cleanup. | Raymond Hettinger | 2005-09-11 | 1 | -2/+1 |
| | |||||
* | Patch #1168594: set sizes of non-regular files to zero. Fixes #1167128. | Martin v. Löwis | 2005-08-27 | 1 | -14/+12 |
| | | | | Will backport to 2.4. | ||||
* | Revert previous checkin. | Martin v. Löwis | 2005-08-24 | 1 | -7/+20 |
| | |||||
* | Patch #1262036: Make tarfile name absolute. Fixes #1257255. | Martin v. Löwis | 2005-08-24 | 1 | -20/+7 |
| | | | | Will backport to 2.4. | ||||
* | Fix all wrong instances of "it's". | Georg Brandl | 2005-07-22 | 1 | -1/+1 |
| | |||||
* | Whitespace normalization. | Tim Peters | 2005-03-28 | 1 | -1/+1 |
| | |||||
* | Patch #918101: Add tarfile open mode r|* for auto-detection of the | Martin v. Löwis | 2005-03-05 | 1 | -30/+66 |
| | | | | stream compression; add, for symmetry reasons, r:* as a synonym of r. | ||||
* | Patch #1043890: tarfile: add extractall() method. | Martin v. Löwis | 2005-03-04 | 1 | -0/+41 |
| | |||||
* | Patch #1103407: Properly deal with tarfile iterators when untarring | Martin v. Löwis | 2005-03-03 | 1 | -4/+15 |
| | | | | symbolic links on Windows. Fixes #1100429. Will backport to 2.4. | ||||
* | Patch #1107973: tarfile.ExFileObject iterators. | Martin v. Löwis | 2005-03-03 | 1 | -0/+16 |
| | |||||
* | Use decorators. | Guido van Rossum | 2005-01-16 | 1 | -10/+5 |
| | |||||
* | Use cStringIO where available. | Raymond Hettinger | 2004-12-31 | 1 | -2/+5 |
| | |||||
* | [Patch #1043972, for bug #1017553] filemode() returns an incorrect value for ↵ | Andrew M. Kuchling | 2004-10-20 | 1 | -27/+34 |
| | | | | the mode 07111 | ||||
* | Patch #1029061: Always extract member names from the tarinfo. | Martin v. Löwis | 2004-09-18 | 1 | -25/+16 |
| | |||||
* | Patch #1014992: Never return more than a line from readline. | Martin v. Löwis | 2004-08-25 | 1 | -3/+1 |
| | | | | Will backport to 2.3. | ||||
* | Flush bz2 data even if nothing had been written so far. Fixes #1013882. | Martin v. Löwis | 2004-08-22 | 1 | -2/+2 |
| | | | | Will backport to 2.3. | ||||
* | Replace tricky and/or with straight-forward if:else: | Martin v. Löwis | 2004-08-20 | 1 | -1/+5 |
| | |||||
* | Patch #995126: Correct directory size, and generate GNU tarfiles by default. | Martin v. Löwis | 2004-08-18 | 1 | -2/+2 |
| | |||||
* | Remove unused variables | Neal Norwitz | 2004-07-20 | 1 | -2/+0 |
| |