Commit Graph

150 Commits

Author SHA1 Message Date
Berker Peksag ce643913a9 Issue #9517: Move script_helper to the support package.
Patch by Christie Wilson.
2015-05-06 06:33:17 +03:00
Eric V. Smith 7a80389ce5 Issue 23193: Add numeric_owner to tarfile.TarFile.extract() and tarfile.TarFile.extractall(). 2015-04-15 10:27:58 -04:00
Berker Peksag 0fe6325acf Issue #21717: tarfile.open() now supports 'x' (exclusive creation) mode. 2015-02-13 21:02:12 +02:00
Serhiy Storchaka 4bdcfce512 Issue #23421: Fixed compression in tarfile CLI. Patch by wdv4758h. 2015-02-10 08:47:10 +02:00
Serhiy Storchaka 832dd5f0d6 Issue #23421: Fixed compression in tarfile CLI. Patch by wdv4758h. 2015-02-10 08:45:53 +02:00
Victor Stinner 57004c696a Issue #21440: Backport changeset 4ebf97299b18 to branch 3.4, use
support.rmtree() and support.unlink() in test_zipfile & test_tarfile
2014-09-04 00:49:01 +02:00
Serhiy Storchaka a7eb746278 Issue #21549: Added the "members" parameter to TarFile.list(). 2014-08-21 10:01:16 +03:00
Serhiy Storchaka a98faefd68 Issue 21044: tarfile.open() now handles fileobj with an integer 'name'
attribute.  Based on patch by Martin Panter.
2014-07-17 00:00:26 +03: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
Tim Golden e0bd2c5fad Issue21440 Use support.rmtree in test_zipfile & test_tarfile 2014-05-06 13:24:26 +01:00
Serhiy Storchaka f6a38e11c0 Issue #20672: Fixed tests for TarFile.list() on non-UTF-8 locales. 2014-02-19 18:50:35 +02:00
Serhiy Storchaka 162c477f41 Issue #20672: Fixed tests for TarFile.list() on non-UTF-8 locales. 2014-02-19 18:44:12 +02: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 a7184e617a Fix typo. 2014-01-24 22:28:06 +02:00
Serhiy Storchaka 2d5a0928f1 Issue #20384: Fix the test_tarfile test on Windows.
On Windows os.open() error message doesn't contain file name.
2014-01-24 22:19:23 +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 f22fe0f507 Test the open of non-exitent tarfile in all modes. 2014-01-13 19:08:00 +02:00
Serhiy Storchaka 2a3d7d1af7 Test the open of non-exitent tarfile in all modes. 2014-01-13 19:07:33 +02:00
Antoine Pitrou 3b7b1e533e Try to fix test_tarfile under Windows 2013-11-24 01:55:05 +01:00
Serhiy Storchaka 5e8c8091ee Build a list of supported test tarfiles dynamically for CLI "test" command
tests (issue13477).
2013-11-24 02:30:59 +02: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
Brett Cannon 260fbe80c5 Issue #15767: Excise the remaining instances of ModuleNotFoundError 2013-07-04 18:16:15 -04:00
Serhiy Storchaka 78be6e8aa3 Issue #18223: Refactor test_tarfile.
* Use mixins for generating tests for different compression types.
* Make test_tarfile discoverable.
* Use more special tests (i.e. assertEqual, assertIs) instead of assertTrue.
* Add explicit test skips instead of reporting skipped tests as passed.
* Wrap long lines.
* Correct a comment for test_hardlink_extraction1.
* Add support.requires_gzip.
* Replace ImportError by  ModuleNotFoundError.

and some other minor enhancements.
2013-06-17 16:11:06 +03:00
Serhiy Storchaka 8b56292079 Issue #18223: Refactor test_tarfile.
* Use mixins for generating tests for different compression types.
* Make test_tarfile discoverable.
* Use more special tests (i.e. assertEqual, assertIs) instead of assertTrue.
* Add explicit test skips instead of reporting skipped tests as passed.
* Wrap long lines.
* Correct a comment for test_hardlink_extraction1.
* Add support.requires_gzip.

and some other minor enhancements.
2013-06-17 15:38:50 +03: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
Serhiy Storchaka 2aa4e6cdec Issue #16645: Fix hardlink extracting test for tarfile. 2012-12-30 20:18:58 +02:00
Serhiy Storchaka 62c75f1e52 Issue #16645: Fix hardlink extracting test for tarfile. 2012-12-30 20:17:28 +02:00
Serhiy Storchaka 88339c44f8 Issue #16645: Fix hardlink extracting test for tarfile. 2012-12-30 20:16:30 +02:00
Andrew Svetlov f7a17b48d7 Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
Andrew Svetlov 3438fa496d Get rig of EnvironmentError (#16705) 2012-12-17 23:35:18 +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 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
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
Lars Gustäbel ac3d137a30 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:46:40 +02:00
Victor Stinner 9c3de4a883 Issue #12326: don't test the major version of sys.platform
Use startswith, instead of ==, when testing sys.platform to support
new platforms like Linux 3 or OpenBSD 5.
2011-08-17 20:49:41 +02:00
Georg Brandl 74b6abf61f Merge with 3.2. 2011-08-13 11:48:40 +02:00
Georg Brandl 3abb372c81 Fix #11513: wrong exception handling for the case that GzipFile itself raises an IOError. 2011-08-13 11:48:12 +02:00
Victor Stinner bf816223df Issue #12451: Add support.create_empty_file()
We don't need to create a temporary buffered binary or text file object just to
create an empty file.

Replace also os.fdopen(handle).close() by os.close(handle).
2011-06-30 23:25:47 +02:00