summaryrefslogtreecommitdiffstats
path: root/Modules/_bz2module.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-43908: Make heap types converted during 3.10 alpha immutable (GH-26351)Erlend Egeberg Aasland2021-06-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make functools types immutable * Multibyte codec types are now immutable * pyexpat.xmlparser is now immutable * array.arrayiterator is now immutable * _thread types are now immutable * _csv types are now immutable * _queue.SimpleQueue is now immutable * mmap.mmap is now immutable * unicodedata.UCD is now immutable * sqlite3 types are now immutable * _lsprof.Profiler is now immutable * _overlapped.Overlapped is now immutable * _operator types are now immutable * winapi__overlapped.Overlapped is now immutable * _lzma types are now immutable * _bz2 types are now immutable * _dbm.dbm and _gdbm.gdbm are now immutable
* bpo-41486: Fix initial buffer size can't > UINT32_MAX in zlib module (GH-25738)Ma Lin2021-04-301-16/+17
| | | | | | | | | | | | | | | | * Fix initial buffer size can't > UINT32_MAX in zlib module After commit f9bedb630e8a0b7d94e1c7e609b20dfaa2b22231, in 64-bit build, if the initial buffer size > UINT32_MAX, ValueError will be raised. These two functions are affected: 1. zlib.decompress(data, /, wbits=MAX_WBITS, bufsize=DEF_BUF_SIZE) 2. zlib.Decompress.flush([length]) This commit re-allows the size > UINT32_MAX. * adds curly braces per PEP 7. * Renames `Buffer_*` to `OutputBuffer_*` for clarity
* bpo-41486: Faster bz2/lzma/zlib via new output buffering (GH-21740)Ma Lin2021-04-281-73/+83
| | | | | | | | | Faster bz2/lzma/zlib via new output buffering. Also adds .readall() function to _compression.DecompressReader class to take best advantage of this in the consume-all-output at once scenario. Often a 5-20% speedup in common scenarios due to less data copying. Contributed by Ma Lin.
* bpo-41052: Fix pickling heap types implemented in C with protocols 0 and 1 ↵Serhiy Storchaka2020-10-241-32/+0
| | | | (GH-22870)
* bpo-40077: Convert _bz2 module to use PyType_FromSpec (GH-20960)Dong-hee Na2020-06-191-114/+216
|
* bpo-40268: Remove unused structmember.h includes (GH-19530)Victor Stinner2020-04-151-1/+1
| | | | | | If only offsetof() is needed: include stddef.h instead. When structmember.h is used, add a comment explaining that PyMemberDef is used.
* bpo-40268: Remove explicit pythread.h includes (#19529)Victor Stinner2020-04-151-2/+0
| | | | Remove explicit pythread.h includes: it is always included by Python.h.
* bpo-40024: Update C extension modules to use PyModule_AddType() (GH-19119)Dong-hee Na2020-03-241-15/+2
| | | | | | Update _asyncio, _bz2, _csv, _curses, _datetime, _io, _operator, _pickle, _queue, blake2, multibytecodec and overlapped C extension modules to use PyModule_AddType().
* bpo-1635741: Port _bz2 extension module to multiphase initialization(PEP ↵Hai Shi2020-02-181-21/+35
| | | | | 489) (GH-18050) https://bugs.python.org/issue1635741
* bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async ↵Jeroen Demeyer2019-05-311-4/+4
| | | | | | | | | (GH-13464) Automatically replace tp_print -> tp_vectorcall_offset tp_compare -> tp_as_async tp_reserved -> tp_as_async
* bpo-33138: Change standard error message for non-pickleable and non-copyable ↵Serhiy Storchaka2018-10-311-18/+0
| | | | types. (GH-6239)
* bpo-35090: Fix potential division by zero in allocator wrappers (GH-10174)Alexey Izbyshev2018-10-281-2/+2
| | | | | | | * Fix potential division by zero in BZ2_Malloc() * Avoid division by zero in PyLzma_Malloc() * Avoid division by zero and integer overflow in PyZlib_Malloc() Reported by Svace static analyzer.
* bpo-33916: Fix bz2 and lzma init when called twice (GH-7843)Victor Stinner2018-06-231-2/+6
| | | | bz2, lzma: When Decompressor.__init__() is called twice, free the old lock to not leak memory.
* bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995)Oren Milman2018-02-131-1/+1
|
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-23/+0
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* bpo-30022: Get rid of using EnvironmentError and IOError (except test… (#1051)Serhiy Storchaka2017-04-161-3/+3
|
* Issue #28275: Merge bz2 fix from 3.5 into 3.6Martin Panter2016-10-011-1/+3
|\
| * Issue #28275: Clean up to avoid use-after-free after bzip decompress failureMartin Panter2016-10-011-1/+3
| |
* | Got rid of redundand "self" parameter declarations.Serhiy Storchaka2016-05-021-2/+1
|/ | | | Argument Clinic is now able to infer all needed information.
* Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-1/+1
|
* Issue #20440: Applied yet one patch for using Py_SETREF.Serhiy Storchaka2015-12-271-3/+2
| | | | The patch is automatically generated, it replaces the code that uses Py_CLEAR.
* Issue #23944: Argument Clinic now wraps long impl prototypes at column 78.Larry Hastings2015-04-141-2/+3
|
* Issue #23501: Argumen Clinic now generates code into separate files by default.Serhiy Storchaka2015-04-031-2/+1
|
* Removed unintentional trailing spaces in non-external and non-generated C files.Serhiy Storchaka2015-03-181-1/+1
|
* Issue #15955: Add an option to limit the output size in bz2.decompress().Antoine Pitrou2015-02-261-58/+201
| | | | Patch by Nikolaus Rath.
* Issue #22156: Fix some "comparison between signed and unsigned integers"Victor Stinner2014-08-151-2/+2
| | | | compiler warnings in the Modules/ subdirectory.
* Issue #20326: Argument Clinic now uses a simple, unique signature toLarry Hastings2014-01-281-6/+6
| | | | | | | | | | annotate text signatures in docstrings, resulting in fewer false positives. "self" parameters are also explicitly marked, allowing inspect.Signature() to authoritatively detect (and skip) said parameters. Issue #20326: Argument Clinic now generates separate checksums for the input and output sections of the block, allowing external tools to verify that the input has not changed (and thus the output is not out-of-date).
* Fix for catestrophic errors in previous checkin (Argument Clinic rollup patch).Larry Hastings2014-01-261-1/+3
|
* Issue #20390: Small fixes and improvements for Argument Clinic.Larry Hastings2014-01-261-9/+2
|
* Issue #20193: The _bz2 module now uses Argument Clinic.Serhiy Storchaka2014-01-251-72/+92
|
* #19395: Raise exception when pickling a (BZ2|LZMA)(Compressor|Decompressor).Nadeem Vawda2013-10-281-2/+20
|\ | | | | | | | | | | | | The underlying C libraries provide no mechanism for serializing compressor and decompressor objects, so actually pickling these classes is impractical. Previously, these objects would be pickled without error, but attempting to use a deserialized instance would segfault the interpreter.
| * #19395: Raise exception when pickling a (BZ2|LZMA)(Compressor|Decompressor).Nadeem Vawda2013-10-281-2/+20
| | | | | | | | | | | | | | The underlying C libraries provide no mechanism for serializing compressor and decompressor objects, so actually pickling these classes is impractical. Previously, these objects would be pickled without error, but attempting to use a deserialized instance would segfault the interpreter.
* | Issue #18227: "Free" function of bz2, lzma and zlib modules has no return ↵Victor Stinner2013-07-071-1/+1
| | | | | | | | value (void)
* | Issue #18227: Use PyMem_RawAlloc() in bz2, lzma and zlib modulesVictor Stinner2013-07-071-0/+21
| |
* | Issue #9566: Fix compiler warning on Windows 64-bit in _bz2module.cVictor Stinner2013-06-041-7/+7
| |
* | Reuse Py_MIN and Py_MAX macros: remove duplicate MIN/MAX macrosVictor Stinner2013-06-041-7/+5
|/ | | | multiprocessing.h: remove unused MIN and MAX macros
* Issue #16828: Fix error incorrectly raised by bz2.compress('').Nadeem Vawda2013-01-021-16/+18
| | | | Initial patch by Martin Packman.
* Merge #14398: Fix size truncation and overflow bugs in bz2 module.Nadeem Vawda2012-10-211-9/+24
|
* Merge #13159: Replace FileIO's quadratic-time buffer growth algorithm with a ↵Nadeem Vawda2011-10-131-12/+4
| | | | | | linear-time one. Also fix the bz2 module, which suffered from the same problem.
* Fix 64-bit safety issue in BZ2Compressor and BZ2Decompressor.Nadeem Vawda2011-04-121-9/+24
|
* Issue #5863: Rewrite BZ2File in pure Python, and allow it to acceptAntoine Pitrou2011-04-031-0/+583
file-like objects using a new `fileobj` constructor argument. Patch by Nadeem Vawda.