| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
The filter argument must be a function that takes a TarInfo
object argument, changes it and returns it again. If the
function returns None the TarInfo object will be excluded
from the archive.
The exclude argument is deprecated from now on, because it
does something similar but is not as flexible.
|
|
|
|
|
|
| |
No longer use tarfile.normpath() on pathnames. Store pathnames
unchanged, i.e. do not remove "./", "../" and "//" occurrences.
However, still convert absolute to relative paths.
|
| |
|
|
|
|
|
|
| |
forever on incomplete input. That caused tarfile.open() to hang when used
with mode 'r' or 'r:bz2' and a fileobj argument that contained no data or
partial bzip2 compressed data.
|
| |
|
| |
|
|
|
|
| |
warnings under -3.
|
|
|
|
|
|
| |
AttributeError since __slots__ were added to zipfile.ZipInfo in
r46967 two years ago.
Add a warning about the removal of TarFileCompat in Python 3.0.
|
|
|
|
| |
when the TarFile is closed.
|
|
|
|
| |
test coverage of valid inputs to zlib.crc32.
|
|
|
|
|
|
| |
permissions for missing directories.
(will backport to 2.5)
|
|
|
|
|
|
| |
directory permissions and times.
(will backport to 2.5)
|
|
|
|
|
|
| |
the start.
(will backport to 2.5)
|
|
|
|
|
|
| |
the fileobj argument has no usable name attribute (e.g. StringIO).
(will backport to 2.5)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
open() as ths is considered best practice.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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'.
|
|
|
|
| |
allow appending to empty files.
|
|
|
|
| |
directories.
|
|
|
|
| |
Will backport to 2.5.
|
|
|
|
|
|
| |
certain conditions.
Will backport to 2.5.
|
|
|
|
|
|
| |
work correctly together with readline().
Will backport to 2.5.
|
| |
|
|
|
|
| |
if a buffer given to frombuf() is invalid.
|
| |
|
|
|
|
| |
GNU modes.
|
| |
|
| |
|
|
|
|
|
|
| |
Patch # 1543897.
Will backport to 2.5
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
a couple of issues, notably handling of long file names using the
GNU LONGNAME extension.
|
|
|
|
|
|
| |
REGTYPE directories from tarfiles written by old programs.
Will backport.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Will backport to 2.4.
|
| |
|
|
|
|
| |
Will backport to 2.4.
|
| |
|
| |
|
|
|
|
| |
stream compression; add, for symmetry reasons, r:* as a synonym of r.
|
| |
|
|
|
|
| |
symbolic links on Windows. Fixes #1100429. Will backport to 2.4.
|
| |
|
| |
|