Commit graph

9443 commits

Author SHA1 Message Date
Martin Panter
e99e97762c Issue #25626: Change zlib to accept Py_ssize_t and cap to UINT_MAX
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.
2015-11-20 08:13:35 +00:00
Victor Stinner
9ba97df69c Closes #25645: Fix a reference leak introduced by change bc5894a3a0e6 of the
issue #24164.
2015-11-17 12:15:07 +01:00
Gregory P. Smith
f31f9718ac Fixes #23564: Fix a partially broken sanity check in the _posixsubprocess
internals regarding how fds_to_pass were passed to the child.  The bug
had no actual impact as subprocess.py already avoided it.
2015-11-15 21:29:43 -08:00
Gregory P. Smith
d0a5b1c343 Fixes #23564: Fix a partially broken sanity check in the _posixsubprocess
internals regarding how fds_to_pass were passed to the child.  The bug
had no actual impact as subprocess.py already avoided it.
2015-11-15 21:15:26 -08:00
Benjamin Peterson
c4b528e809 merge 3.5 (#25578) 2015-11-14 15:14:58 -08:00
Benjamin Peterson
fcc2e71e99 merge 3.4 (#25578) 2015-11-14 15:14:42 -08:00
Benjamin Peterson
025a1fd990 rm trailing ws 2015-11-14 15:12:38 -08:00
Benjamin Peterson
f0c9038a36 fix possible memory lea k in _get_aia_uri (closes #25578) 2015-11-14 15:12:18 -08:00
Benjamin Peterson
449e7c1b06 merge 3.5 (#25569) 2015-11-14 00:11:19 -08:00
Benjamin Peterson
2463001a15 merge 3.4 (#25569) 2015-11-14 00:11:09 -08:00
Benjamin Peterson
806fb25405 fix build with older openssl (#25569) 2015-11-14 00:09:22 -08:00
Martin Panter
ceaabc100c Issue #25498: Merge ctypes crash fix from 3.5 2015-11-13 22:14:53 +00:00
Martin Panter
0da4ac1f21 Issue #25498: Merge ctypes crash fix from 3.4 into 3.5 2015-11-13 22:12:12 +00:00
Martin Panter
1bb651540e Issue #25498: Fix GC crash due to ctypes objects wrapping a memoryview
This was a regression caused by revision 1da9630e9b7f.  Based on patch by
Eryksun.
2015-11-13 21:43:39 +00:00
Benjamin Peterson
d5d6e331fb merge 3.5 (#25530) 2015-11-11 22:45:36 -08:00
Benjamin Peterson
45bde5d2ee merge 3.4 (#25530) 2015-11-11 22:45:22 -08:00
Benjamin Peterson
a9dcdabccb always set OP_NO_SSLv3 by default (closes #25530) 2015-11-11 22:38:41 -08:00
Benjamin Peterson
ea54d319d6 merge 3.5 (#25569) 2015-11-11 22:14:31 -08:00
Benjamin Peterson
86429bd174 merge 3.5 (#25569) 2015-11-11 22:14:08 -08:00
Benjamin Peterson
eda06c8f5e fix memory leak in _get_crl_dp (closes #25569)
Patch started by Stéphane Wirtel.
2015-11-11 22:07:38 -08:00
Serhiy Storchaka
fad85aadb0 Issue #25558: Use compile-time asserts. 2015-11-07 15:42:38 +02:00
Serhiy Storchaka
12b2538ab8 Reuse Py_STRINGIFY() macro in sre_lib.h and dynload_win.c. 2015-11-05 17:43:42 +02:00
Raymond Hettinger
4a91d21381 Neaten-up the inner-loop logic. 2015-11-03 22:00:26 -05:00
Serhiy Storchaka
4a7c03aab4 Issue #25523: Merge a-to-an corrections from 3.5. 2015-11-02 14:44:29 +02:00
Serhiy Storchaka
f51d715845 Issue #25523: Further a-to-an corrections new in 3.5. 2015-11-02 14:40:41 +02:00
Serhiy Storchaka
a84f6c3dd3 Issue #25523: Merge a-to-an corrections from 3.4. 2015-11-02 14:39:05 +02:00
Raymond Hettinger
df8f5b56c9 Minor cleanup. 2015-11-02 07:27:40 -05:00
Serhiy Storchaka
d65c9496da Issue #25523: Further a-to-an corrections. 2015-11-02 14:10:23 +02:00
Raymond Hettinger
0bdf9ea136 merge 2015-11-02 00:04:46 -05:00
Raymond Hettinger
67b97b8f8d Move the initial start-search out of the main loop so it can be factored-out later. 2015-11-01 23:57:37 -05:00
Martin Panter
e56a919100 Issue #25523: Merge a-to-an corrections from 3.5 2015-11-02 04:27:17 +00:00
Martin Panter
d2ad5718ad Issue #25523: Further a-to-an corrections new in 3.5 2015-11-02 04:20:33 +00:00
Martin Panter
2eb819f7a8 Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5 2015-11-02 04:04:57 +00:00
Martin Panter
7462b64911 Issue #25523: Correct "a" article to "an" article
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
or edited some other way to fix the grammar.
2015-11-02 03:37:02 +00:00
Serhiy Storchaka
dcd1a0309f Issue #25447: The lru_cache() wrapper objects now can be copied and pickled
(by returning the original object unchanged).
2015-10-24 09:50:19 +03:00
Serhiy Storchaka
45120f272b Issue #25447: The lru_cache() wrapper objects now can be copied and pickled
(by returning the original object unchanged).
2015-10-24 09:49:56 +03:00
Raymond Hettinger
db41fd43cf Removed unused parameter 2015-10-22 22:48:16 -07:00
Raymond Hettinger
0f43bb160e Only update the state variable once per iteration. 2015-10-20 00:03:33 -07:00
Raymond Hettinger
20151f50f6 Issue #25414: Remove unnecessary tests that can never succeed. 2015-10-16 22:47:29 -07:00
Raymond Hettinger
1eca237c2f Remove old Todo entry that isn't going to happen. 2015-10-15 23:25:53 -07:00
Raymond Hettinger
a4b13d0020 Rewrap comment. 2015-10-15 08:05:31 -07:00
Raymond Hettinger
bc00341105 Use unsigned division 2015-10-14 23:33:23 -07:00
Raymond Hettinger
1286d14500 Improve variable names and constant expressions 2015-10-14 23:16:57 -07:00
Victor Stinner
f9c9a3fedf Refactor binascii.rledecode_hqx()
Rewrite the code to handle the output buffer.
2015-10-14 15:20:07 +02:00
Victor Stinner
1bfe930585 Issue #25384: Fix binascii.rledecode_hqx()
Fix usage of _PyBytesWriter API. Use the new _PyBytesWriter_Resize() function
instead of _PyBytesWriter_Prepare().
2015-10-14 15:02:35 +02:00
Victor Stinner
eaaaf136d2 Issue #25384: Use _PyBytesWriter API in binascii
This API avoids a final call to _PyBytes_Resize() for output smaller than 512
bytes.

Small optimization: disable overallocation in binascii.rledecode_hqx() for the
last write.
2015-10-13 10:51:47 +02:00
Victor Stinner
f7d2471260 Merge 3.5 (sys.setrecursionlimit) 2015-10-13 00:16:07 +02:00
Victor Stinner
50856d5ae7 sys.setrecursionlimit() now raises RecursionError
Issue #25274: sys.setrecursionlimit() now raises a RecursionError if the new
recursion limit is too low depending at the current recursion depth. Modify
also the "lower-water mark" formula to make it monotonic. This mark is used to
decide when the overflowed flag of the thread state is reset.
2015-10-13 00:11:21 +02:00
Victor Stinner
358af13526 Issue #25353: Optimize unicode escape and raw unicode escape encoders to use
the new _PyBytesWriter API.
2015-10-12 22:36:57 +02:00
Raymond Hettinger
965362e92d Minor fixup. maxlen is already known. 2015-10-11 22:52:54 -07:00