| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Patch by Serhiy Storchaka.
|
| |
| |
| |
| | |
Patch by Serhiy Storchaka.
|
| | |
|
| |
| |
| |
| |
| | |
The fileobj argument was added during the 3.3 development cycle, so this change
does not break backward compatibility with 3.2.
|
| |
| |
| |
| | |
Patch by Justin Peel.
|
| |
| |
| |
| | |
tarfile.filemode alias with deprecation warning.
|
| |
| |
| |
| |
| |
| | |
After a discussion in the tracker, the decision was made to keep the
ExFileObject class after all as a subclass of io.BufferedReader instead of
removing it completely.
|
| |
| |
| |
| | |
The ExFileObject class was removed, some of its code went into _FileInFile.
|
|\ \
| |/
| |
| | |
links when the links were not located in an archive subdirectory.
|
| |
| |
| |
| | |
when the links were not located in an archive subdirectory.
|
| | |
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
On platforms that do not support (symbolic) links, tarfile offers a
work-around and extracts a link in an archive as the regular file the link is
pointing to. On other platforms, this code was accidentally executed even
after the link had been successfully extracted which failed due to the already
existing link.
|
| |
| |
| |
| |
| |
| |
| |
| | |
On platforms that do not support (symbolic) links, tarfile offers a
work-around and extracts a link in an archive as the regular file the link is
pointing to. On other platforms, this code was accidentally executed even
after the link had been successfully extracted which failed due to the already
existing link.
|
| |
| |
| |
| | |
leaving the os.SEEK_* constants only for os.lseek, as documented
|
| | |
|
| | |
|
|\ \
| |/
| |
| | |
other than 900k.
|
| | |
|
| | |
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
fields in tarfile.
The nti() function that converts a number field from a tar header to a number
failed to decode GNU tar specific base-256 fields. I also added support for
decoding and encoding negative base-256 number fields.
|
| |
| |
| |
| |
| |
| | |
The nti() function that converts a number field from a tar header to a number
failed to decode GNU tar specific base-256 fields. I also added support for
decoding and encoding negative base-256 number fields.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
tarfile unnecessarily checked the existence of numerical user and group ids on
extraction. If one of them did not exist the respective id of the current user
(i.e. root) was used for the file and ownership information was lost. (Patch
by Sebastien Luttringer)
|
|\ \
| |/ |
|
| |
| |
| |
| | |
raises an IOError.
|
|\ \
| |/
| |
| | |
as it is no longer applicable in hg. Patch Contributed by Neil Muller.
|
| |
| |
| |
| | |
longer applicable in hg. Patch Contributed by Neil Muller.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88528 | lars.gustaebel | 2011-02-23 12:42:22 +0100 (Wed, 23 Feb 2011) | 16 lines
Issue #11224: Improved sparse file read support (r85916) introduced a
regression in _FileInFile which is used in file-like objects returned
by TarFile.extractfile(). The inefficient design of the
_FileInFile.read() method causes various dramatic side-effects and
errors:
- The data segment of a file member is read completely into memory
every(!) time a small block is accessed. This is not only slow
but may cause unexpected MemoryErrors with very large files.
- Reading members from compressed tar archives is even slower
because of the excessive backwards seeking which is done when the
same data segment is read over and over again.
- As a backwards seek on a TarFile opened in stream mode is not
possible, using extractfile() fails with a StreamError.
........
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
'latin-1' and 'utf-8'.
These are optimized in the Python Unicode implementation
to result in more direct processing, bypassing the codec
registry.
Also see issue11303.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
regression in _FileInFile which is used in file-like objects returned
by TarFile.extractfile(). The inefficient design of the
_FileInFile.read() method causes various dramatic side-effects and
errors:
- The data segment of a file member is read completely into memory
every(!) time a small block is accessed. This is not only slow
but may cause unexpected MemoryErrors with very large files.
- Reading members from compressed tar archives is even slower
because of the excessive backwards seeking which is done when the
same data segment is read over and over again.
- As a backwards seek on a TarFile opened in stream mode is not
possible, using extractfile() fails with a StreamError.
|
|
|
|
|
|
|
| |
keyword-only argument. The preceding positional argument was deprecated,
so it made no sense to add filter as a positional argument.
(Patch reviewed by Brian Curtin and Anthony Long.)
|
| |
|
|
|
|
| |
and its test suite.
|
|
|
|
|
|
|
|
| |
extensions. Thus, in addition to GNUTYPE_SPARSE headers, sparse
information in pax headers created by GNU tar can now be decoded.
All three formats 0.0, 0.1 and 1.0 are supported.
On filesystems that support this, holes in files are now restored
whenever a sparse member is extracted.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
uname and gname field.
If tarfile creates a new archive and adds a file with a
uid/gid that doesn't have a corresponding name on the
system (e.g. because the user/group account was deleted) it
uses the empty string in the uname/gname field now instead
of "root". Using "root" as the default was a bad idea
because on extraction the uname/gname fields are supposed
to override the uid/gid fields. So, all archive members
with nameless uids/gids belonged to the root user after
extraction.
|
| |
|
| |
|
|
|
|
| |
objects explicitly instead of letting them linger on.
|
|
|
|
|
|
|
|
|
| |
using WindowsError in a try/except. Only add WindowsError to the list of
exceptions to catch when we are actually running on Windows.
Additionally, add a call that was left out in test_posixpath.
Thanks Amaury, Antoine, and Jason.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added Windows support for os.symlink when run on Windows 6.0 or greater,
aka Vista. Previous Windows versions will raise NotImplementedError
when trying to symlink.
Includes numerous test updates and additions to test_os, including
a symlink_support module because of the fact that privilege escalation
is required in order to run the tests to ensure that the user is able
to create symlinks. By default, accounts do not have the required
privilege, so the escalation code will have to be exposed later (or
documented on how to do so). I'll be following up with that work next.
Note that the tests use ctypes, which was agreed on during the PyCon
language summit.
|
|
|
|
| |
Note: file system encoding cannot be None anymore (since r81190, issue #8610).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81667 | lars.gustaebel | 2010-06-03 14:34:14 +0200 (Thu, 03 Jun 2010) | 8 lines
Issue #8741: Fixed the TarFile.makelink() method that is responsible
for extracting symbolic and hard link entries as regular files as a
work-around on platforms that do not support filesystem links.
This stopped working reliably after a change in r74571. I also added
a few tests for this functionality.
........
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81663 | lars.gustaebel | 2010-06-03 11:56:22 +0200 (Thu, 03 Jun 2010) | 4 lines
Issue #8833: tarfile created hard link entries with a size
field != 0 by mistake. The associated testcase did not
expose this bug because it was broken too.
........
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tarfile is now able to read and write pax headers with a
"hdrcharset=BINARY" record. This record was introduced in
POSIX.1-2008 as a method to store unencoded binary strings that
cannot be translated to UTF-8. In practice, this is just a workaround
that allows a tar implementation to store filenames that do not
comply with the current filesystem encoding and thus cannot be
decoded correctly.
Additionally, tarfile works around a bug in current versions of GNU
tar: undecodable filenames are stored as-is in a pax header without a
"hdrcharset" record being added. Technically, these headers are
invalid, but tarfile manages to read them correctly anyway.
|
|
|
|
| |
(instead of replace in read mode or strict in write mode)
|
|
|
|
| |
Fix for issue #7908
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80616 | lars.gustaebel | 2010-04-29 17:23:38 +0200 (Thu, 29 Apr 2010) | 4 lines
Issue #8464: tarfile.open(name, mode="w|") no longer creates
files with execute permissions set.
........
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78623 | lars.gustaebel | 2010-03-03 12:55:48 +0100 (Wed, 03 Mar 2010) | 3 lines
Issue #7232: Add support for the context manager protocol
to the TarFile class.
........
|