| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
containing non-encodable characters. Added tests for TarFile.list().
Based on patch by Vajrasky Kok.
|
|
|
|
| |
tarfile open functions.
|
| |
|
|
|
|
| |
write complete output on close.
|
|
|
|
| |
empty mode.
|
|
|
|
|
|
|
| |
requires them. Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface. Fixed
shebang line to use python3 executable in the unittestgui script.
|
| |
|
|
|
|
| |
it left off. Patch by Michael Birtwell.
|
|\
| |
| |
| | |
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).
|