summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_gzip.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-34898: Add mtime parameter to gzip.compress(). (GH-9704)guoci2018-11-071-0/+11
| | | | | Without setting mtime, time.time() will be used as the timestamp which will end up in the compressed data and each invocation of the compress() function will vary over time.
* bpo-34969: Add --fast, --best on the gzip CLI (GH-9833)Stéphane Wirtel2018-11-031-2/+30
|
* bpo-23596: Add unit tests for the command line for the gzip module (GH-9775)Stéphane Wirtel2018-10-091-6/+93
| | | | Add unit tests for the command line for the gzip module
* bpo-28286: Add tests for the mode argument of GzipFile. (#4074)Serhiy Storchaka2017-10-221-0/+24
|
* Issue #28227: gzip now supports pathlibBerker Peksag2016-10-021-0/+22
| | | | Patch by Ethan Furman.
* Use sequence repetition instead of bytes constructor with integer argument.Serhiy Storchaka2016-09-111-2/+2
|
* Issue #25626: Change zlib to accept Py_ssize_t and cap to UINT_MAXMartin Panter2015-11-201-0/+9
| | | | | | | | | | | | | | The underlying zlib library stores sizes in “unsigned int”. The corresponding Python parameters are all sizes of buffers filled in by zlib, so it is okay to reduce higher values to the UINT_MAX internal cap. OverflowError is still raised for sizes that do not fit in Py_ssize_t. Sizes are now limited to Py_ssize_t rather than unsigned long, because Python byte strings cannot be larger than Py_ssize_t. Previously this could result in a SystemError on 32-bit platforms. This resolves a regression in the gzip module when reading more than UINT_MAX or LONG_MAX bytes in one call, introduced by revision 62723172412c.
* Issue #23529: Limit the size of decompressed data when reading fromAntoine Pitrou2015-04-101-2/+21
| | | | | | | | GzipFile, BZ2File or LZMAFile. This defeats denial of service attacks using compressed bombs (i.e. compressed payloads which decompress to a huge size). Patch by Martin Panter and Nikolaus Rath.
* Issue #23688: Added support of arbitrary bytes-like objects and avoidedSerhiy Storchaka2015-03-231-0/+37
| | | | | unnecessary copying of memoryview in gzip.GzipFile.write(). Original patch by Wolfgang Maier.
* Issue #20875: Merge from 3.3Ned Deily2014-03-091-0/+7
|\
| * Issue #20875: Prevent possible gzip "'read' is not defined" NameError.Ned Deily2014-03-091-0/+7
| | | | | | | | Patch by Claudiu Popa.
| * Issue #19936: Remove executable bits from C source files and several forgottenSerhiy Storchaka2014-01-161-0/+0
| | | | | | | | test files.
* | Issue #19936: Added executable bits or shebang lines to Python scripts whichSerhiy Storchaka2014-01-161-1/+0
|\ \ | |/ | | | | | | | | | | 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.
| * Issue #19936: Added executable bits or shebang lines to Python scripts whichSerhiy Storchaka2014-01-161-1/+0
| | | | | | | | | | | | | | 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.
| * Back out patch for #1159051, which caused backwards compatibility problems.Georg Brandl2013-05-121-14/+0
| |
* | Issue #19222: Add support for the 'x' mode to the gzip module.Nadeem Vawda2013-10-181-0/+37
|/ | | | Original patch by Tim Heaney.
* Close #17666: Fix reading gzip files with an extra field.Serhiy Storchaka2013-04-081-0/+7
|
* Issue #1159051: GzipFile now raises EOFError when reading a corrupted fileSerhiy Storchaka2013-01-221-0/+14
|\ | | | | | | | | with truncated header or footer. Added tests for reading truncated gzip, bzip2, and lzma files.
| * Issue #1159051: GzipFile now raises EOFError when reading a corrupted fileSerhiy Storchaka2013-01-221-0/+15
| | | | | | | | | | with truncated header or footer. Added tests for reading truncated gzip and bzip2 files.
* | Fix GzipFile's handling of filenames given as bytes objects.Nadeem Vawda2012-06-191-0/+14
|\ \ | |/ | | | | Add relevant tests for GzipFile, and also for BZ2File and LZMAFile.
| * Fix GzipFile's handling of filenames given as bytes objects.Nadeem Vawda2012-06-191-0/+14
| |
* | Add fileobj support to gzip.open().Nadeem Vawda2012-06-041-0/+13
| |
* | Really fix test_gzip failures on Windows.Nadeem Vawda2012-05-061-5/+7
| |
* | Fix test_gzip failures on Windows.Nadeem Vawda2012-05-061-3/+3
| |
* | Separate tests for gzip.GzipFile and gzip.open.Nadeem Vawda2012-05-061-15/+14
| |
* | Closes #13989: Add support for text modes to gzip.open().Nadeem Vawda2012-05-061-0/+88
| | | | | | | | Also, add tests for gzip.open().
* | Merge: #13781: Fix GzipFile to work with os.fdopen()'d file objects.Nadeem Vawda2012-01-181-0/+8
|\ \ | |/
| * Issue #13781: Fix GzipFile to work with os.fdopen()'d file objects.Nadeem Vawda2012-01-181-0/+8
| |
* | #13012: use splitlines(keepends=True/False) instead of splitlines(0/1).Ezio Melotti2011-09-281-2/+2
| |
* | Issue #10791: Implement missing method GzipFile.read1(), allowing GzipFileAntoine Pitrou2011-04-041-0/+23
|/ | | | to be wrapped in a TextIOWrapper. Patch by Nadeem Vawda.
* #9424: Replace deprecated assert* methods in the Python test suite.Ezio Melotti2010-11-201-2/+2
|
* #10465: fix broken delegation in __getattr__ of _PaddedFile.Georg Brandl2010-11-201-0/+6
|
* Implement #7944. Use `with` throughout the test suite.Brian Curtin2010-10-131-117/+104
|
* Issue #9759: GzipFile now raises ValueError when an operation is attemptedAntoine Pitrou2010-10-061-0/+22
| | | | after the file is closed. Patch by Jeffrey Finkelstein.
* Issue #9962: GzipFile now has the peek() method.Antoine Pitrou2010-09-291-0/+22
|
* Issue #1675951: Allow GzipFile to work with unseekable file objects.Antoine Pitrou2010-09-231-0/+21
| | | | Patch by Florian Festi.
* Issue #3488: Provide convenient shorthand functions `gzip.compress`Antoine Pitrou2010-08-171-0/+20
| | | | and `gzip.decompress`. Original patch by Anand B. Pillai.
* convert shebang lines: python -> python3Benjamin Peterson2010-03-111-1/+1
|
* Merged revisions 77472-77473 via svnmerge fromAntoine Pitrou2010-01-131-0/+12
| | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77472 | antoine.pitrou | 2010-01-13 15:32:10 +0100 (mer., 13 janv. 2010) | 5 lines Issue #2846: Add support for gzip.GzipFile reading zero-padded files. Patch by Brian Curtin. ........ r77473 | antoine.pitrou | 2010-01-13 15:32:51 +0100 (mer., 13 janv. 2010) | 3 lines Add ACKS entry for r77472. ........
* Merged revisions 77288 via svnmerge fromAntoine Pitrou2010-01-031-0/+11
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77288 | antoine.pitrou | 2010-01-03 23:29:56 +0100 (dim., 03 janv. 2010) | 5 lines Issue #7471: Improve the performance of GzipFile's buffering mechanism, and make it implement the `io.BufferedIOBase` ABC to allow for further speedups by wrapping it in an `io.BufferedReader`. Patch by Nir Aides. ........
* Merged revisions 74754 via svnmerge fromEzio Melotti2009-09-121-2/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r74754 | ezio.melotti | 2009-09-12 17:43:43 +0300 (Sat, 12 Sep 2009) | 1 line #6026 - fix tests that failed without zlib ........
* convert old fail* assertions to assert*Benjamin Peterson2009-06-301-3/+3
|
* Merged revisions 68484-68485 via svnmerge fromAntoine Pitrou2009-01-101-1/+21
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r68484 | antoine.pitrou | 2009-01-10 17:13:45 +0100 (sam., 10 janv. 2009) | 3 lines Issue #3860: GzipFile and BZ2File now support the context manager protocol. ........ r68485 | antoine.pitrou | 2009-01-10 17:15:24 +0100 (sam., 10 janv. 2009) | 1 line Add NEWS entry for r68484. ........
* Merged revisions 68319 via svnmerge fromAntoine Pitrou2009-01-041-0/+63
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r68319 | antoine.pitrou | 2009-01-04 22:29:23 +0100 (dim., 04 janv. 2009) | 3 lines Issue #4272: Add an optional argument to the GzipFile constructor to override the timestamp in the gzip stream. ........
* make FileIO.mode always include 'b'Benjamin Peterson2008-11-221-1/+1
| | | | #4386 Reviewed by Amaury
* fix test_gzipBenjamin Peterson2008-11-211-1/+1
|
* Merged revisions ↵Georg Brandl2008-05-251-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 63412,63445-63447,63449-63450,63452,63454,63459,63463,63465,63470,63483-63484,63496-63497,63499-63501,63530-63531,63540,63614 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r63412 | georg.brandl | 2008-05-17 19:57:01 +0200 (Sat, 17 May 2008) | 2 lines #961805: fix Edit.text_modified(). ........ r63445 | georg.brandl | 2008-05-18 10:52:59 +0200 (Sun, 18 May 2008) | 2 lines GHOP #180 by Michael Schneider: add examples to the socketserver documentation. ........ r63446 | georg.brandl | 2008-05-18 11:12:20 +0200 (Sun, 18 May 2008) | 2 lines GHOP #134, #171, #137: unit tests for the three HTTPServer modules. ........ r63447 | georg.brandl | 2008-05-18 12:39:26 +0200 (Sun, 18 May 2008) | 3 lines Take namedtuple item names only from ascii_letters (this blew up on OSX), and make sure there are no duplicate names. ........ r63449 | georg.brandl | 2008-05-18 13:46:51 +0200 (Sun, 18 May 2008) | 2 lines GHOP #217: add support for compiling Python with coverage checking enabled. ........ r63450 | georg.brandl | 2008-05-18 13:52:36 +0200 (Sun, 18 May 2008) | 2 lines GHOP #257: test distutils' build_ext command, written by Josip Dzolonga. ........ r63452 | georg.brandl | 2008-05-18 15:34:06 +0200 (Sun, 18 May 2008) | 2 lines Add GHOP students. ........ r63454 | georg.brandl | 2008-05-18 18:32:48 +0200 (Sun, 18 May 2008) | 2 lines GHOP #121: improve test_pydoc, by Benjamin Peterson. ........ r63459 | benjamin.peterson | 2008-05-18 22:48:07 +0200 (Sun, 18 May 2008) | 2 lines bring test_pydoc up to my high standards (now that I have them) ........ r63463 | georg.brandl | 2008-05-18 23:10:19 +0200 (Sun, 18 May 2008) | 2 lines Fix test_pyclbr after another platform-dependent function was added to urllib. ........ r63465 | benjamin.peterson | 2008-05-19 01:07:07 +0200 (Mon, 19 May 2008) | 2 lines change some imports in tests so they will not be skipped in 3.0 ........ r63470 | georg.brandl | 2008-05-19 18:47:25 +0200 (Mon, 19 May 2008) | 2 lines test_httpservers has unpredictable refcount behavior. ........ r63483 | georg.brandl | 2008-05-20 08:15:36 +0200 (Tue, 20 May 2008) | 2 lines Activate two more test cases in test_httpservers. ........ r63484 | georg.brandl | 2008-05-20 08:47:31 +0200 (Tue, 20 May 2008) | 2 lines Argh, this is the *actual* test that works under Windows. ........ r63496 | georg.brandl | 2008-05-20 10:07:36 +0200 (Tue, 20 May 2008) | 2 lines Improve diffing logic and output for test_pydoc. ........ r63497 | georg.brandl | 2008-05-20 10:10:03 +0200 (Tue, 20 May 2008) | 2 lines Use inspect.getabsfile() to get the documented module's filename. ........ r63499 | georg.brandl | 2008-05-20 10:25:48 +0200 (Tue, 20 May 2008) | 3 lines Patch #1775025: allow opening zipfile members via ZipInfo instances. Patch by Graham Horler. ........ r63500 | georg.brandl | 2008-05-20 10:40:43 +0200 (Tue, 20 May 2008) | 2 lines #2592: delegate nb_index and the floor/truediv slots in weakref.proxy. ........ r63501 | georg.brandl | 2008-05-20 10:48:34 +0200 (Tue, 20 May 2008) | 2 lines #615772: raise a more explicit error from Tkinter.Misc.__contains__. ........ r63530 | benjamin.peterson | 2008-05-22 02:57:02 +0200 (Thu, 22 May 2008) | 2 lines use more specific asserts in test_opcode ........ r63531 | benjamin.peterson | 2008-05-22 03:02:23 +0200 (Thu, 22 May 2008) | 2 lines remove redundant invocation of json doctests ........ r63540 | benjamin.peterson | 2008-05-23 01:09:26 +0200 (Fri, 23 May 2008) | 3 lines fix test_pydoc so it works on make installed Python installations Also let it pass when invoked directly ........ r63614 | georg.brandl | 2008-05-25 10:07:37 +0200 (Sun, 25 May 2008) | 2 lines #2959: allow multiple close() calls for GzipFile. ........
* #2621 rename test.test_support to test.supportBenjamin Peterson2008-05-201-5/+5
|
* Always try to delete the data file before and after the test.Neal Norwitz2008-03-241-5/+2
| | | | | This will hopefully avoid spurious failures if the file doesn't have the proper permissions to write for some reason.
* Merged revisions 60990-61002 via svnmerge fromChristian Heimes2008-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r60990 | eric.smith | 2008-02-23 17:05:26 +0100 (Sat, 23 Feb 2008) | 1 line Removed duplicate Py_CHARMASK define. It's already defined in Python.h. ........ r60991 | andrew.kuchling | 2008-02-23 17:23:05 +0100 (Sat, 23 Feb 2008) | 4 lines #1330538: Improve comparison of xmlrpclib.DateTime and datetime instances. Remove automatic handling of datetime.date and datetime.time. This breaks backward compatibility, but python-dev discussion was strongly against this automatic conversion; see the bug for a link. ........ r60994 | andrew.kuchling | 2008-02-23 17:39:43 +0100 (Sat, 23 Feb 2008) | 1 line #835521: Add index entries for various pickle-protocol methods and attributes ........ r60995 | andrew.kuchling | 2008-02-23 18:10:46 +0100 (Sat, 23 Feb 2008) | 2 lines #1433694: minidom's .normalize() failed to set .nextSibling for last element. Fix by Malte Helmert ........ r61000 | christian.heimes | 2008-02-23 18:40:11 +0100 (Sat, 23 Feb 2008) | 1 line Patch #2167 from calvin: Remove unused imports ........ r61001 | christian.heimes | 2008-02-23 18:42:31 +0100 (Sat, 23 Feb 2008) | 1 line Patch #1957: syslogmodule: Release GIL when calling syslog(3) ........ r61002 | christian.heimes | 2008-02-23 18:52:07 +0100 (Sat, 23 Feb 2008) | 2 lines Issue #2051 and patch from Alexander Belopolsky: Permission for pyc and pyo files are inherited from the py file. ........