summaryrefslogtreecommitdiffstats
path: root/Lib/tarfile.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a)Brett Cannon2013-07-041-6/+6
|
* Issue #18200: Update the stdlib (except tests) to useBrett Cannon2013-06-141-6/+6
| | | | ModuleNotFoundError.
* Issue #16601: Restarting iteration over tarfile no more continues from whereSerhiy Storchaka2013-05-091-5/+7
|\ | | | | | | it left off. Patch by Michael Birtwell.
| * Issue #16601: Restarting iteration over tarfile no more continues from whereSerhiy Storchaka2013-05-091-5/+7
| | | | | | | | it left off. Patch by Michael Birtwell.
* | Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-7/+7
| |
* | Issue #16719: Get rid of WindowsError. Use OSError insteadAndrew Svetlov2012-12-191-2/+2
| | | | | | | | Patch by Serhiy Storchaka.
* | Get rig of EnvironmentError (#16705)Andrew Svetlov2012-12-171-4/+4
| |
* | Merge issue #16477: Close tarfile internal handlers in case of exception.Andrew Svetlov2012-11-291-13/+11
|\ \ | |/ | | | | Patch by Serhiy Storchaka.
| * Merge issue #16477: Close tarfile internal handlers in case of exception.Andrew Svetlov2012-11-291-13/+11
| |\ | | | | | | | | | Patch by Serhiy Storchaka.
| | * Issue #16477: Close tarfile internal handlers in case of exception.Andrew Svetlov2012-11-291-13/+11
| | | | | | | | | | | | Patch by Serhiy Storchaka.
* | | #16135: Removal of OS/2 support (Python code partial cleanup)Jesus Cea2012-10-051-2/+1
|/ /
* | Simplify usage of LZMAFile's fileobj support, like with BZ2File.Nadeem Vawda2012-06-041-2/+1
| |
* | Make BZ2File's fileobj support easier to use.Nadeem Vawda2012-06-041-2/+2
| | | | | | | | | | The fileobj argument was added during the 3.3 development cycle, so this change does not break backward compatibility with 3.2.
* | Issue #13031: Small speed-up for tarfile when unzipping tarfiles.Ross Lagerwall2012-05-171-2/+2
| | | | | | | | Patch by Justin Peel.
* | #14807: move undocumented tarfile.filemode() to stat.filemode(). Add ↵Giampaolo Rodola'2012-05-151-41/+7
| | | | | | | | tarfile.filemode alias with deprecation warning.
* | Issue #13815: Resurrect the ExFileObject class.Lars Gustäbel2012-05-141-8/+9
| | | | | | | | | | | | 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.
* | Issue #13815: TarFile.extractfile() now returns io.BufferedReader objects.Lars Gustäbel2012-05-051-154/+42
| | | | | | | | The ExFileObject class was removed, some of its code went into _FileInFile.
* | Merge with 3.2: Issue #14160: TarFile.extractfile() failed to resolve symbolicLars Gustäbel2012-04-241-1/+1
|\ \ | |/ | | | | links when the links were not located in an archive subdirectory.
| * Issue #14160: TarFile.extractfile() failed to resolve symbolic linksLars Gustäbel2012-04-241-1/+1
| | | | | | | | when the links were not located in an archive subdirectory.
* | Issue #5689: Avoid excessive memory usage by using the default lzma preset.Lars Gustäbel2012-01-181-5/+1
| |
* | Merge from 3.2: Issue #12926: Fix a bug in tarfile's link extraction.Lars Gustäbel2012-01-051-6/+0
|\ \ | |/ | | | | | | | | | | | | 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.
| * Issue #12926: Fix a bug in tarfile's link extraction.Lars Gustäbel2012-01-051-6/+0
| | | | | | | | | | | | | | | | 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.
* | use io.SEEK_* constants instead of os.SEEK_* where an IO stream is seeked, ↵Eli Bendersky2012-01-031-4/+5
| | | | | | | | leaving the os.SEEK_* constants only for os.lseek, as documented
* | Issue #5689: Add support for lzma compression to the tarfile module.Lars Gustäbel2011-12-101-6/+60
| |
* | Remove no longer needed work-around for bz2 file object support.Lars Gustäbel2011-12-061-64/+2
| |
* | Merge with 3.2: Correctly detect bzip2 compressed streams with blocksizes ↵Lars Gustäbel2011-12-061-1/+1
|\ \ | |/ | | | | other than 900k.
| * Correctly detect bzip2 compressed streams with blocksizes other than 900k.Lars Gustäbel2011-12-061-1/+1
| |
* | Simplify and remove few dependencies on 'errno', thanks to PEP 3151.Florent Xicluna2011-10-281-4/+2
| |
* | Merge with 3.2: Issue #13158: Fix decoding and encoding of base-256 number ↵Lars Gustäbel2011-10-141-20/+23
|\ \ | |/ | | | | | | | | | | | | 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.
| * Issue #13158: Fix decoding and encoding of base-256 number fields in tarfile.Lars Gustäbel2011-10-141-20/+23
| | | | | | | | | | | | 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.
* | Merge with 3.2: Issue #12841: Fix tarfile extraction of non-existent uids/gids.Lars Gustäbel2011-09-051-8/+2
|\ \ | |/
| * Issue #12841: Fix tarfile extraction of non-existent uids/gids.Lars Gustäbel2011-09-051-8/+2
| | | | | | | | | | | | | | 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)
* | Merge with 3.2.Georg Brandl2011-08-131-2/+4
|\ \ | |/
| * Fix #11513: wrong exception handling for the case that GzipFile itself ↵Georg Brandl2011-08-131-2/+4
| | | | | | | | raises an IOError.
* | merge from 3.2 - Fix closes Issue11439 Remove the SVN keywords from the code ↵Senthil Kumaran2011-07-281-2/+2
|\ \ | |/ | | | | as it is no longer applicable in hg. Patch Contributed by Neil Muller.
| * Fix closes Issue11439 Remove the SVN keywords from the code as it is no ↵Senthil Kumaran2011-07-281-2/+2
| | | | | | | | longer applicable in hg. Patch Contributed by Neil Muller.
| * Merged revisions 88528 via svnmerge fromLars Gustäbel2011-02-231-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ........
* | remove __version__s dependent on subversion keyword expansion (closes #12221)Benjamin Peterson2011-06-011-2/+0
| |
* | Normalize the encoding names for Latin-1 and UTF-8 toMarc-André Lemburg2011-02-251-9/+9
| | | | | | | | | | | | | | | | | | | | '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.
* | Issue #11224: Improved sparse file read support (r85916) introduced aLars Gustäbel2011-02-231-3/+2
|/ | | | | | | | | | | | | | | | 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.
* Issue #11014: Make 'filter' argument in tarfile.Tarfile.add() into aRaymond Hettinger2011-01-261-2/+2
| | | | | | | 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.)
* Issue #10184: Touch directories only once when extracting a tarfile.Martin v. Löwis2010-11-011-9/+13
|
* Issue #10233: Close file objects in a timely manner in the tarfile moduleAntoine Pitrou2010-10-291-9/+7
| | | | and its test suite.
* Add read support for all missing variants of the GNU sparseLars Gustäbel2010-10-291-119/+112
| | | | | | | | 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.
* Issue #9065: no longer use "root" as the default for theLars Gustäbel2010-10-041-4/+4
| | | | | | | | | | | | | | 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.
* Fix a line that got hacked up by r82659.Brian Curtin2010-09-241-1/+2
|
* Further tarfile / test_tarfile cleanupAntoine Pitrou2010-09-231-24/+33
|
* Try to fix test_tarfile issues on Windows buildbots by closing fileAntoine Pitrou2010-09-231-1/+7
| | | | objects explicitly instead of letting them linger on.
* Fix the breakage of Lib/tarfile.py on non-Windows platforms due toBrian Curtin2010-07-091-6/+14
| | | | | | | | | 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.
* Implement #1578269. Patch by Jason R. Coombs.Brian Curtin2010-07-081-2/+10
| | | | | | | | | | | | | | | | 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.