aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_zlib.py
Commit message (Collapse)AuthorAge
* gh-101322: Ensure test_zlib.ZlibDecompressorTest runs, fix errors in ↵Ruben Vorderman2023-02-04
| | | | | ZlibDecompressor (#101323) * Ensure test_zlib.ZlibDecompressorTest actually runs, fix errors in ZlibDecompressor.
* gh-95534: Improve gzip reading speed by 10% (#97664)Ruben Vorderman2022-10-16
| | | | | | | | | Change summary: + There is now a `gzip.READ_BUFFER_SIZE` constant that is 128KB. Other programs that read in 128KB chunks: pigz and cat. So this seems best practice among good programs. Also it is faster than 8 kb chunks. + a zlib._ZlibDecompressor was added. This is the _bz2.BZ2Decompressor ported to zlib. Since the zlib.Decompress object is better for in-memory decompression, the _ZlibDecompressor is hidden. It only makes sense in file decompression, and that is already implemented now in the gzip library. No need to bother the users with this. + The ZlibDecompressor uses the older Cpython arrange_output_buffer functions, as those are faster and more appropriate for the use case. + GzipFile.read has been optimized. There is no longer a `unconsumed_tail` member to write back to padded file. This is instead handled by the ZlibDecompressor itself, which has an internal buffer. `_add_read_data` has been inlined, as it was just two calls. EDIT: While I am adding improvements anyway, I figured I could add another one-liner optimization now to the python -m gzip application. That read chunks in io.DEFAULT_BUFFER_SIZE previously, but has been updated now to use READ_BUFFER_SIZE chunks.
* bpo-46623: Skip two test_zlib tests on s390x (GH-31096)Victor Stinner2022-02-25
| | | | Skip test_pair() and test_speech128() of test_zlib on s390x since they fail if zlib uses the s390x hardware accelerator.
* bpo-43613: Faster implementation of gzip.compress and gzip.decompress (GH-27941)Ruben Vorderman2021-09-02
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-43988: Use check disallow instantiation helper (GH-26392)Erlend Egeberg Aasland2021-05-27
|
* bpo-43916: Apply Py_TPFLAGS_DISALLOW_INSTANTIATION to selected types (GH-25748)Erlend Egeberg Aasland2021-04-30
| | | | | | | | | | | | | | | | | | | | | Apply Py_TPFLAGS_DISALLOW_INSTANTIATION to the following types: * _dbm.dbm * _gdbm.gdbm * _multibytecodec.MultibyteCodec * _sre..SRE_Scanner * _thread._localdummy * _thread.lock * _winapi.Overlapped * array.arrayiterator * functools.KeyWrapper * functools._lru_list_elem * pyexpat.xmlparser * re.Match * re.Pattern * unicodedata.UCD * zlib.Compress * zlib.Decompress
* bpo-40275: Use new test.support helper submodules in tests (GH-21315)Hai Shi2020-07-06
|
* bpo-40286: Use random.randbytes() in tests (GH-19575)Victor Stinner2020-04-17
|
* bpo-36048: Use __index__() instead of __int__() for implicit conversion if ↵Serhiy Storchaka2019-02-25
| | | | | | available. (GH-11952) Deprecate using the __int__() method in implicit conversions of Python numbers to C integers.
* bpo-34582: Update syntax of Azure Pipelines builds (GH-9521)Steve Dower2018-09-24
|
* bpo-25007: Add copy protocol support to zlib compressors and decompressors ↵Zackery Spytz2018-06-27
| | | | (GH-7940)
* bpo-32969: Expose some missing constants in zlib and fix the doc (GH-5988)Xiang Zhang2018-03-07
|
* bpo-32682: Improve libz version parsing in test_zilb (GH-5347)pmp-p2018-02-18
|
* Replace KB unit with KiB (#4293)Victor Stinner2017-11-08
| | | | | | | | | | | kB (*kilo* byte) unit means 1000 bytes, whereas KiB ("kibibyte") means 1024 bytes. KB was misused: replace kB or KB with KiB when appropriate. Same change for MB and GB which become MiB and GiB. Change the output of Tools/iobench/iobench.py. Round also the size of the documentation from 5.5 MB to 5 MiB.
* Issue #16764: Move NEWS entry to correct section and remove too strict test.Serhiy Storchaka2016-08-18
|
* Issue #16764: Support keyword arguments to zlib.decompress(). Patch bySerhiy Storchaka2016-08-15
| | | | Xiang Zhang.
* Issue #27130: Merge zlib 64-bit fixes from 3.5Martin Panter2016-07-23
|\
| * Issue #27130: Fix handling of buffers exceeding UINT_MAX in “zlib” moduleMartin Panter2016-07-23
| | | | | | | | Patch by Xiang Zhang.
* | Issue #26243: Only the level argument to zlib.compress() is keyword argumentSerhiy Storchaka2016-06-25
| | | | | | | | now. The first argument is positional-only.
* | Issue #27164: Merge raw Deflate zdict support from 3.5Martin Panter2016-06-05
|\|
| * Issue #27164: Allow decompressing raw Deflate streams with predefined zdictMartin Panter2016-06-05
| | | | | | | | Based on patch by Xiang Zhang.
* | Issue #5784: Merge zlib from 3.5Martin Panter2016-05-27
|\|
| * Issue #5784: wbits=0 apparently added in zlib v1.2.3.5Martin Panter2016-05-27
| |
* | Issue #5784: Merge zlib from 3.5Martin Panter2016-05-27
|\|
| * Issue #5784: Expand documentation and tests for zlib wbits parameterMartin Panter2016-05-27
| | | | | | | | Based on documentation by AM Kuchling.
* | Issue #15984: Merge PyUnicode doc from 3.5Martin Panter2016-04-15
|\|
| * Correct “an” → “a” with “Unicode”, “user”, “UTF”, etcMartin Panter2016-04-15
| | | | | | | | This affects documentation, code comments, and a debugging messages.
* | Issue #26243: zlib.compress() keyword argument support by Aviv PalivodaMartin Panter2016-02-10
|/
* Issue #22341: Drop Python 2 workaround and document CRC initial valueMartin Panter2015-12-11
| | | | Also align the parameter naming in binascii to be consistent with zlib.
* Issue #25626: Change zlib to accept Py_ssize_t and cap to UINT_MAXMartin Panter2015-11-20
| | | | | | | | | | | | | | 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 #22995: Default implementation of __reduce__ and __reduce_ex__ nowSerhiy Storchaka2015-11-12
|\ | | | | | | | | rejects builtin types with not defined __new__. Added tests for non-pickleable types.
| * Issue #22995: Default implementation of __reduce__ and __reduce_ex__ nowSerhiy Storchaka2015-11-12
| | | | | | | | | | rejects builtin types with not defined __new__. Added tests for non-pickleable types.
* | Issue #23738: Merge 3.4 into 3.5Martin Panter2015-09-09
|\|
| * Issue #23738: Document and test actual keyword parameter namesMartin Panter2015-09-09
| | | | | | | | Also fix signature because os.utime(..., ns=None) is not allowed.
* | Issue #21741: Update 147 test modules to use test discovery.Zachary Ware2015-04-13
|/ | | | | | | I have compared output between pre- and post-patch runs of these tests to make sure there's nothing missing and nothing broken, on both Windows and Linux. The only differences I found were actually tests that were previously *not* run.
* Issue #18702: All skipped tests now reported as skipped.Serhiy Storchaka2013-11-03
|
* Issue #16411: Fix a bug where zlib.decompressobj().flush() might try to ↵Nadeem Vawda2012-11-11
|\ | | | | | | | | | | access previously-freed memory. Patch by Serhiy Storchaka.
| * Issue #16411: Fix a bug where zlib.decompressobj().flush() might try to ↵Nadeem Vawda2012-11-11
| | | | | | | | | | | | access previously-freed memory. Patch by Serhiy Storchaka.
* | Issue #16350, part 2: Set unused_data (and unconsumed_tail) correctly in ↵Nadeem Vawda2012-11-11
|\| | | | | | | | | | | | | | | | | | | decompressobj().flush(). Additionally, fix a bug where a MemoryError in allocating a bytes object could leave the decompressor object in an invalid state (with its unconsumed_tail member being NULL). Patch by Serhiy Storchaka.
| * Issue #16350, part 2: Set unused_data (and unconsumed_tail) correctly in ↵Nadeem Vawda2012-11-11
| | | | | | | | | | | | | | | | | | | | decompressobj().flush(). Additionally, fix a bug where a MemoryError in allocating a bytes object could leave the decompressor object in an invalid state (with its unconsumed_tail member being NULL). Patch by Serhiy Storchaka.
* | Issue #16350: Fix zlib decompressor handling of unused_data with multiple ↵Nadeem Vawda2012-11-05
|\| | | | | | | | | | | calls to decompress() after EOF. Patch by Serhiy Storchaka.
| * Issue #16350: Fix zlib decompressor handling of unused_data with multiple ↵Nadeem Vawda2012-11-05
| | | | | | | | | | | | calls to decompress() after EOF. Patch by Serhiy Storchaka.
| * Issue #13873: Fix crash in test_zlib when running on a small (<4GB) tmpfs.Nadeem Vawda2012-02-27
| |
* | Tidy up comments from dd4f7d5c51c7 (zlib compression dictionary support).Nadeem Vawda2012-06-22
| |
* | Issue #14684: Add support for predefined compression dictionaries to the ↵Nadeem Vawda2012-06-21
| | | | | | | | | | | | zlib module. Original patch by Sam Rushing.
* | Simplify zlib bigmem tests.Nadeem Vawda2012-02-23
| |
* | Fix previous fix (for test_zlib) to work on 32-bit systems.Nadeem Vawda2012-02-23
| |
* | Issue #13873: Fix crash in test_zlib on bigmem buildbot.Nadeem Vawda2012-02-23
| |
* | Fix typo in comment.Nadeem Vawda2012-01-28
| |
* | Issue #13862: Relax zlib version test to avoid spurious failures.Nadeem Vawda2012-01-25
| |