Commit Graph

139 Commits

Author SHA1 Message Date
Larry Hastings 61272b77b0 Issue #19273: The marker comments Argument Clinic uses have been changed
to improve readability.
2014-01-07 12:41:53 -08:00
Larry Hastings 3f144c2ad7 Issue #20142: Py_buffer variables generated by Argument Clinic are now
initialized with a default value.
2014-01-06 10:34:00 -08:00
Larry Hastings 78cf85c669 Issue #19659: Added documentation for Argument Clinic. 2014-01-04 12:44:57 -08:00
Larry Hastings 3cceb38486 Issue #19976: Argument Clinic METH_NOARGS functions now always
take two parameters.
2014-01-04 11:09:09 -08:00
Victor Stinner 5c86733c8a Issue #18294: Fix uint_converter() in zlibmodule.c, fix the "> UINT_MAX" check 2014-01-03 12:26:12 +01:00
Larry Hastings dc6aaec9e3 Clinic: fix "self converters" with METH_NOARGS functions. 2013-11-24 04:41:57 -08:00
Larry Hastings 44e2eaab54 Issue #19674: inspect.signature() now produces a correct signature
for some builtins.
2013-11-23 15:37:55 -08:00
Larry Hastings ebdcb50b8a Issue #19730: Argument Clinic now supports all the existing PyArg
"format units" as legacy converters, as well as two new features:
"self converters" and the "version" directive.
2013-11-23 14:54:00 -08:00
Victor Stinner e079eddf21 Close #18294: Fix the zlib module to make it 64-bit safe 2013-11-21 22:33:21 +01:00
Larry Hastings ed4a1c5703 Argument Clinic: rename "self" to "module" for module-level functions. 2013-11-18 09:32:13 -08:00
Larry Hastings 3182680210 Issue #16612: Add "Argument Clinic", a compile-time preprocessor
for C files to generate argument parsing code.  (See PEP 436.)
2013-10-19 00:09:25 -07:00
Victor Stinner 7979926616 Issue #18408: Fix usage of _PyBytes_Resize()
_PyBytes_Resize(&v, new_size) sets v to NULL on error, so v cannot be used
anymore. Replace "Py_DECREF(v); v = NULL;" with "Py_CLEAR(v);".
2013-07-09 00:35:22 +02:00
Victor Stinner bf2e2f9bdf Issue #18408: Fix zlib.compressobj() to handle PyThread_allocate_lock() failure
(MemoryError).
2013-07-09 00:29:03 +02:00
Victor Stinner b7f1f65f1c Issue #18227: "Free" function of bz2, lzma and zlib modules has no return value (void) 2013-07-07 17:10:34 +02:00
Victor Stinner 5064a52bcb Issue #18227: Use PyMem_RawAlloc() in bz2, lzma and zlib modules 2013-07-07 16:50:27 +02:00
Victor Stinner b64049183c Issue #18203: Replace malloc() with PyMem_Malloc() in Python modules
Replace malloc() with PyMem_Malloc() when the GIL is held, or with
PyMem_RawMalloc() otherwise.
2013-07-07 16:21:41 +02:00
Victor Stinner bc8ccce729 Issue #9566: zlib: Explicit cast to unsigned int to fix a compiler warning on Windows x64 2013-06-24 23:02:51 +02:00
Charles-Francois Natali 74ca886788 Issue #17917: Use PyModule_AddIntMacro() instead of PyModule_AddIntConstant()
when applicable.
2013-05-20 19:13:19 +02:00
Victor Stinner e8289618bf zlib: Explicit cast to fix a compiler warning 2013-05-07 23:50:21 +02:00
Nadeem Vawda cba149761a Issue #15677: Document that zlib and gzip accept a compression level of 0 to mean 'no compression'.
Patch by Brian Brazil.
2012-11-11 14:20:09 +01:00
Nadeem Vawda 6ff262e18f Issue #15677: Document that zlib and gzip accept a compression level of 0 to mean 'no compression'.
Patch by Brian Brazil.
2012-11-11 14:14:47 +01:00
Nadeem Vawda 19e568d254 Issue #15677: Document that zlib and gzip accept a compression level of 0 to mean 'no compression'.
Patch by Brian Brazil.
2012-11-11 14:04:14 +01:00
Nadeem Vawda 9c40022e38 Issue #16411: Fix a bug where zlib.decompressobj().flush() might try to access previously-freed memory.
Patch by Serhiy Storchaka.
2012-11-11 03:19:49 +01:00
Nadeem Vawda ec6dfcffa0 Issue #16411: Fix a bug where zlib.decompressobj().flush() might try to access previously-freed memory.
Patch by Serhiy Storchaka.
2012-11-11 03:16:44 +01:00
Nadeem Vawda 7ee955550b Issue #16411: Fix a bug where zlib.decompressobj().flush() might try to access previously-freed memory.
Patch by Serhiy Storchaka.
2012-11-11 03:15:32 +01:00
Nadeem Vawda 9ea64e38b5 Issue #16350, part 2: Set unused_data (and unconsumed_tail) correctly in 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.
2012-11-11 02:24:37 +01:00
Nadeem Vawda dd1253abdd Issue #16350, part 2: Set unused_data (and unconsumed_tail) correctly in 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.
2012-11-11 02:21:22 +01:00
Nadeem Vawda ee7889dec3 Issue #16350, part 2: Set unused_data (and unconsumed_tail) correctly in 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.
2012-11-11 02:14:36 +01:00
Nadeem Vawda ec8c8ae7ae Issue #16350: Fix zlib decompressor handling of unused_data with multiple calls to decompress() after EOF.
Patch by Serhiy Storchaka.
2012-11-05 00:40:00 +01:00
Nadeem Vawda 519f43844b Issue #16350: Fix zlib decompressor handling of unused_data with multiple calls to decompress() after EOF.
Patch by Serhiy Storchaka.
2012-11-05 00:38:48 +01:00
Nadeem Vawda 39079946a2 Issue #16350: Fix zlib decompressor handling of unused_data with multiple calls to decompress() after EOF.
Patch by Serhiy Storchaka.
2012-11-05 00:37:42 +01:00
Victor Stinner 56cb12542d Issue #9566: Explicit downcast to fix compiler warnings on Win64 2012-10-31 00:33:57 +01:00
Nadeem Vawda 2180c97a00 Document the rest of zlib.compressobj()'s arguments.
Original patch by Jim Jewett; see issue 14684.
2012-06-22 01:40:49 +02:00
Nadeem Vawda cf5e1d82e3 Tidy up comments from dd4f7d5c51c7 (zlib compression dictionary support). 2012-06-22 00:35:57 +02:00
Nadeem Vawda fd8a838d58 Issue #14684: Add support for predefined compression dictionaries to the zlib module.
Original patch by Sam Rushing.
2012-06-21 02:13:12 +02:00
Nadeem Vawda 64d25ddb9c Issue #12306: Add ZLIB_RUNTIME_VERSION to the zlib module.
While we're at it, also document ZLIB_VERSION.

Patch by Torsten Landschoff.
2011-09-12 00:04:13 +02:00
Nadeem Vawda 44c6ef50af Merge: #12839: Fix crash in zlib module due to version mismatch.
If the version of zlib used to compile the zlib module is incompatible
with the one that is actually linked in, then calls into zlib will fail.
This can leave attributes of the z_stream uninitialized, so we must take
care to avoid segfaulting by trying to use an invalid pointer.

Fix by Richard M. Tew.
2011-08-28 11:29:35 +02:00
Nadeem Vawda 524148ad7a Issue #12839: Fix crash in zlib module due to version mismatch.
If the version of zlib used to compile the zlib module is incompatible
with the one that is actually linked in, then calls into zlib will fail.
This can leave attributes of the z_stream uninitialized, so we must take
care to avoid segfaulting by trying to use an invalid pointer.

Fix by Richard M. Tew.
2011-08-28 11:26:46 +02:00
Nadeem Vawda 3bf71c54d8 Fix incorrect comment in zlib.Decompress.flush().
Reported by Oleg Oshmyan in issue #12646.
2011-08-13 15:42:50 +02:00
Nadeem Vawda 1c38546e49 Issue #12646: Add an 'eof' attribute to zlib.Decompress.
This will make it easier to detect truncated input streams.

Also, make zlib's error messages more consistent.
2011-08-13 15:22:40 +02:00
Nadeem Vawda 0c3d96ae1d Issue #8650: Make zlib.[de]compressobj().[de]compress() 64-bit clean.
Raise an OverflowError if the input data is too large, instead of silently
truncating the input and returning an incorrect result.
2011-05-15 00:19:50 +02:00
Nadeem Vawda 1b8a417d9f Issue #8650: Backport 64-bit safety fixes for compress() and decompress(). 2011-05-14 22:26:55 +02:00
Nadeem Vawda 7619e88adb Issue #12050: zlib.decompressobj().decompress() now clears the unconsumed_tail
attribute when called without a max_length argument.
2011-05-14 14:05:20 +02:00
Antoine Pitrou 9e719b6eba Merged revisions 88460,88464,88466,88486,88511,88652 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88460 | antoine.pitrou | 2011-02-21 19:03:13 +0100 (lun., 21 févr. 2011) | 4 lines

  Issue #10276: Fix the results of zlib.crc32() and zlib.adler32() on buffers
  larger than 4GB.  Patch by Nadeem Vawda.
........
  r88464 | antoine.pitrou | 2011-02-21 20:05:08 +0100 (lun., 21 févr. 2011) | 3 lines

  Fix issues on 32-bit systems introduced by r88460
........
  r88466 | antoine.pitrou | 2011-02-21 20:28:40 +0100 (lun., 21 févr. 2011) | 3 lines

  Fix compile error under MSVC introduced by r88460.
........
  r88486 | antoine.pitrou | 2011-02-22 00:41:12 +0100 (mar., 22 févr. 2011) | 5 lines

  Issue #4681: Allow mmap() to work on file sizes and offsets larger than
  4GB, even on 32-bit builds.  Initial patch by Ross Lagerwall, adapted for
  32-bit Windows.
........
  r88511 | antoine.pitrou | 2011-02-22 22:42:56 +0100 (mar., 22 févr. 2011) | 4 lines

  Issue #11277: finally fix Snow Leopard crash following r88460.
  (probably an OS-related issue with mmap)
........
  r88652 | antoine.pitrou | 2011-02-26 16:58:05 +0100 (sam., 26 févr. 2011) | 4 lines

  Issue #9931: Fix hangs in GUI tests under Windows in certain conditions.
  Patch by Hirokazu Yamamoto.
........
2011-02-28 23:48:16 +00:00
Antoine Pitrou 96f212b377 Merged revisions 81100 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r81100 | antoine.pitrou | 2010-05-12 01:46:02 +0200 (mer., 12 mai 2010) | 10 lines

  Merged revisions 81098 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r81098 | antoine.pitrou | 2010-05-12 01:42:28 +0200 (mer., 12 mai 2010) | 5 lines

    Issue #8681: Make the zlib module's error messages more informative when
    the zlib itself doesn't give any detailed explanation.
  ........
................
2010-05-11 23:49:58 +00:00
Antoine Pitrou 7f14f0d8a0 Recorded merge of revisions 81032 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines

  Recorded merge of revisions 81029 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines

    Untabify C files. Will watch buildbots.
  ........
................
2010-05-09 16:14:21 +00:00
Antoine Pitrou 4b3fe14d4b Merged revisions 80928 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r80928 | antoine.pitrou | 2010-05-07 19:04:02 +0200 (ven., 07 mai 2010) | 11 lines

  Merged revisions 80926 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r80926 | antoine.pitrou | 2010-05-07 18:50:34 +0200 (ven., 07 mai 2010) | 5 lines

    Issue #8571: Fix an internal error when compressing or decompressing a
    chunk larger than 1GB with the zlib module's compressor and decompressor
    objects.
  ........
................
2010-05-07 17:08:54 +00:00
Antoine Pitrou c8428d3dce Merged revisions 76836 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r76836 | antoine.pitrou | 2009-12-14 19:00:06 +0100 (lun., 14 déc. 2009) | 5 lines

  Issue #4757: `zlib.compress` and other methods in the zlib module now
  raise a TypeError when given an `str` object (rather than a `bytes`-like
  object).  Patch by Victor Stinner and Florent Xicluna.
........
2009-12-14 18:23:30 +00:00
Mark Dickinson e94c679df0 Issue #1717: rename tp_compare to tp_reserved. I'll change the
type of tp_compare in a separate commit, for ease of reversion
should things go wrong.
2009-02-02 20:36:42 +00:00
Antoine Pitrou 31f30b17fe Issue #4738: finer-grained locking in the zlib module. 2009-01-02 17:34:35 +00:00