Commit Graph

164 Commits

Author SHA1 Message Date
Serhiy Storchaka cf4a2f29ad Issue #23615: Modules bz2, tarfile and tokenize now can be reloaded with
imp.reload().  Patch by Thomas Kluyver.
2015-03-11 17:18:03 +02:00
Serhiy Storchaka 832dd5f0d6 Issue #23421: Fixed compression in tarfile CLI. Patch by wdv4758h. 2015-02-10 08:45:53 +02:00
Serhiy Storchaka 2c6a3aedeb Issue 21044: tarfile.open() now handles fileobj with an integer 'name'
attribute.  Based on patch by Martin Panter.
2014-07-16 23:58:58 +03:00
Victor Stinner 7fa767e517 Issue #20976: pyflakes: Remove unused imports 2014-03-20 09:16:38 +01:00
Serhiy Storchaka 255493c813 Issue #19920: TarFile.list() no longer fails when outputs a listing
containing non-encodable characters.  Added tests for TarFile.list().
Based on patch by Vajrasky Kok.
2014-02-05 20:54:43 +02:00
Serhiy Storchaka 3b4f1594ff Issue #19920: TarFile.list() no longer fails when outputs a listing
containing non-encodable characters.  Added tests for TarFile.list().
Based on patch by Vajrasky Kok.
2014-02-05 20:53:36 +02:00
Serhiy Storchaka 2d1f092469 Issue #20244: Fixed possible file leaks when unexpected error raised in
tarfile open functions.
2014-01-18 16:28:37 +02:00
Serhiy Storchaka e413cde95f Issue #20244: Fixed possible file leaks when unexpected error raised in
tarfile open functions.
2014-01-18 16:28:08 +02:00
Serhiy Storchaka aee0e63ed0 Issue #20243: TarFile no longer raise ReadError when opened in write mode. 2014-01-18 16:14:49 +02:00
Serhiy Storchaka c2d01423e0 Issue #20243: TarFile no longer raise ReadError when opened in write mode. 2014-01-18 16:14:10 +02:00
Serhiy Storchaka 7d68a1c921 Issue #20238: TarFile opened with external fileobj and "w:gz" mode didn't
write complete output on close.
2014-01-18 15:53:39 +02:00
Serhiy Storchaka 9fbec7ad5e Issue #20238: TarFile opened with external fileobj and "w:gz" mode didn't
write complete output on close.
2014-01-18 15:53:05 +02:00
Serhiy Storchaka ce644a09ac Issue #20245: The open functions in the tarfile module now correctly handle empty mode. 2014-01-18 15:37:21 +02:00
Serhiy Storchaka 53ad0cd284 Issue #20245: The open functions in the tarfile module now correctly handle empty mode. 2014-01-18 15:35:37 +02:00
Serhiy Storchaka 8f8ec92de8 Issue #19936: Added executable bits or shebang lines to Python scripts which
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 lines in the unittestgui and checkpip scripts.
2014-01-16 17:33:23 +02:00
Serhiy Storchaka b992a0e102 Issue #19936: Added executable bits or shebang lines to Python scripts which
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.
2014-01-16 17:15:49 +02:00
Ethan Furman df3ed242c0 Issue19995: %o, %x, %X now only accept ints 2014-01-05 06:50:30 -08:00
Serhiy Storchaka d27b455bbc Issue #13477: Added command line interface to the tarfile module.
Original patch by Berker Peksag.
2013-11-24 01:53:29 +02:00
Ethan Furman da14920247 Close #18281: superfluous stat constants removed from tarfile 2013-10-12 18:13:02 -07:00
Ezio Melotti 9a3777e525 #18705: merge with 3.3. 2013-08-17 15:53:55 +03:00
Ezio Melotti 30b9d5d3af #18705: fix a number of typos. Patch by Févry Thibault. 2013-08-17 15:50:46 +03:00
Brett Cannon cd171c8e92 Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
Brett Cannon 0a140668fa Issue #18200: Update the stdlib (except tests) to use
ModuleNotFoundError.
2013-06-13 20:57:26 -04:00
Serhiy Storchaka b3c5d85680 Issue #16601: Restarting iteration over tarfile no more continues from where
it left off.  Patch by Michael Birtwell.
2013-05-09 14:36:58 +03:00
Serhiy Storchaka 263fab94ee Issue #16601: Restarting iteration over tarfile no more continues from where
it left off.  Patch by Michael Birtwell.
2013-05-09 14:22:26 +03:00
Andrew Svetlov f7a17b48d7 Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
Andrew Svetlov 2606a6f197 Issue #16719: Get rid of WindowsError. Use OSError instead
Patch by Serhiy Storchaka.
2012-12-19 14:33:35 +02:00
Andrew Svetlov 3438fa496d Get rig of EnvironmentError (#16705) 2012-12-17 23:35:18 +02:00
Andrew Svetlov 7030dd8500 Merge issue #16477: Close tarfile internal handlers in case of exception.
Patch by Serhiy Storchaka.
2012-11-29 14:21:39 +02:00
Andrew Svetlov 7ecd13da5f Merge issue #16477: Close tarfile internal handlers in case of exception.
Patch by Serhiy Storchaka.
2012-11-29 14:21:23 +02:00
Andrew Svetlov 718df1d638 Issue #16477: Close tarfile internal handlers in case of exception.
Patch by Serhiy Storchaka.
2012-11-29 14:20:47 +02:00
Jesus Cea 4791a24268 #16135: Removal of OS/2 support (Python code partial cleanup) 2012-10-05 03:15:39 +02:00
Nadeem Vawda 33c34da574 Simplify usage of LZMAFile's fileobj support, like with BZ2File. 2012-06-04 23:34:07 +02:00
Nadeem Vawda aebcdba829 Make BZ2File's fileobj support easier to use.
The fileobj argument was added during the 3.3 development cycle, so this change
does not break backward compatibility with 3.2.
2012-06-04 23:31:20 +02:00
Ross Lagerwall 468ff4c3ed Issue #13031: Small speed-up for tarfile when unzipping tarfiles.
Patch by Justin Peel.
2012-05-17 19:49:27 +02:00
Giampaolo Rodola' ffa1d0b8d5 #14807: move undocumented tarfile.filemode() to stat.filemode(). Add tarfile.filemode alias with deprecation warning. 2012-05-15 15:30:25 +02:00
Lars Gustäbel b062a2fa17 Issue #13815: Resurrect the ExFileObject class.
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.
2012-05-14 13:18:16 +02:00
Lars Gustäbel 7a919e9930 Issue #13815: TarFile.extractfile() now returns io.BufferedReader objects.
The ExFileObject class was removed, some of its code went into _FileInFile.
2012-05-05 18:15:03 +02:00
Lars Gustäbel 9f478c021d Merge with 3.2: Issue #14160: TarFile.extractfile() failed to resolve symbolic
links when the links were not located in an archive subdirectory.
2012-04-24 21:09:17 +02:00
Lars Gustäbel 1ef9eda7bc Issue #14160: TarFile.extractfile() failed to resolve symbolic links
when the links were not located in an archive subdirectory.
2012-04-24 21:04:40 +02:00
Lars Gustäbel c5e1199f38 Issue #5689: Avoid excessive memory usage by using the default lzma preset. 2012-01-18 14:01:17 +01:00
Lars Gustäbel dee45e20f6 Issue #12926: Fix a bug in tarfile's link extraction.
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.
2012-01-05 18:48:06 +01:00
Lars Gustäbel 8f771a4716 Merge from 3.2: Issue #12926: Fix a bug in tarfile's link extraction.
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.
2012-01-05 18:53:00 +01:00
Eli Bendersky 74c503b40d use io.SEEK_* constants instead of os.SEEK_* where an IO stream is seeked, leaving the os.SEEK_* constants only for os.lseek, as documented 2012-01-03 06:26:13 +02:00
Lars Gustäbel 0a9dd2f11d Issue #5689: Add support for lzma compression to the tarfile module. 2011-12-10 20:38:14 +01:00
Lars Gustäbel bb44b73e17 Remove no longer needed work-around for bz2 file object support. 2011-12-06 13:44:10 +01:00
Lars Gustäbel 45fb082180 Merge with 3.2: Correctly detect bzip2 compressed streams with blocksizes other than 900k. 2011-12-06 13:00:58 +01:00
Lars Gustäbel ed1ac587df Correctly detect bzip2 compressed streams with blocksizes other than 900k. 2011-12-06 12:56:38 +01:00
Florent Xicluna 68f71a34f4 Simplify and remove few dependencies on 'errno', thanks to PEP 3151. 2011-10-28 16:06:23 +02:00
Lars Gustäbel 01277d166a Merge with 3.2: Issue #13158: Fix decoding and encoding of base-256 number 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.
2011-10-14 12:53:10 +02:00