Commit graph

9972 commits

Author SHA1 Message Date
Ned Deily
e1d4e58777 Issue #26406: Avoid unnecessary serialization of getaddrinfo(3) calls on
current versions of OpenBSD and NetBSD.  Patch by A. Jesse Jiryu Davis.
2016-02-23 22:05:29 +11:00
Benjamin Peterson
4a180a693f merge 3.5 (closes #25939) 2016-02-17 22:18:35 -08:00
Benjamin Peterson
1378f7ca68 merge 3.4 (closes #25939) 2016-02-17 22:18:20 -08:00
Benjamin Peterson
9491272751 open the cert store readonly
Patch from Chi Hsuan Yen.
2016-02-17 22:13:19 -08:00
Ned Deily
00538ffe3a Issue #25924: merge with 3.5 2016-02-15 16:57:04 +11:00
Ned Deily
47299fd39c Issue #25924: Avoid unnecessary serialization of getaddrinfo(3) calls on OS X
versions 10.5 or higher.  Original patch by A. Jesse Jiryu Davis.
2016-02-15 16:54:08 +11:00
Raymond Hettinger
b6f17f5210 The return type of a rich comparison is an int 2016-02-14 01:41:35 -08:00
Serhiy Storchaka
ffe96ae10b Issue #25994: Added the close() method and the support of the context manager
protocol for the os.scandir() iterator.
2016-02-11 13:21:30 +02:00
Martin Panter
3008b1c4bb Issue #26304: Merge doc wording from 3.5 2016-02-10 05:44:56 +00:00
Martin Panter
c04fb56e36 Issue #26304: Change "allows to <verb>" to "allows <verb>ing" or similar
The original form is incorrect grammar and feels awkward, even though the
meaning is clear.
2016-02-10 05:44:01 +00:00
Martin Panter
b0cb42dfdb Issue 26243: Forgot to update zlib doc strings in Argument Clinic 2016-02-10 10:45:54 +00:00
Martin Panter
1fe0d13d12 Issue #26243: zlib.compress() keyword argument support by Aviv Palivoda 2016-02-10 10:06:36 +00:00
Raymond Hettinger
38418662e0 Issue #26200: The SETREF macro adds unnecessary work in some cases. 2016-02-08 20:34:49 -08:00
Serhiy Storchaka
fd625c39d0 Issue #26117: The os.scandir() iterator now closes file descriptor not only
when the iteration is finished, but when it was failed with error.
2016-02-08 17:57:22 +02:00
Serhiy Storchaka
988b9bcd88 Issue #26117: The os.scandir() iterator now closes file descriptor not only
when the iteration is finished, but when it was failed with error.
2016-02-08 17:56:36 +02:00
Serhiy Storchaka
65aaef423b Issue #25945: Fixed bugs in functools.partial.
Fixed a crash when unpickle the functools.partial object with wrong state.
Fixed a leak in failed functools.partial constructor.
"args" and "keywords" attributes of functools.partial have now always types
tuple and dict correspondingly.
2016-02-02 18:45:47 +02:00
Martin Panter
8254f793c0 Issue #26244: Merge zlib documentation from 3.5 2016-02-03 07:52:06 +00:00
Martin Panter
567d513b9b Issue #26244: Clarify default zlib compression level in documentation
Based on patch by Aviv Palivoda.
2016-02-03 07:06:33 +00:00
Serhiy Storchaka
3874128519 Issue #25945: Fixed bugs in functools.partial.
Fixed a crash when unpickle the functools.partial object with wrong state.
Fixed a leak in failed functools.partial constructor.
"args" and "keywords" attributes of functools.partial have now always types
tuple and dict correspondingly.
2016-02-02 18:45:17 +02:00
Raymond Hettinger
a63897164e merge 2016-02-01 21:21:19 -08:00
Raymond Hettinger
b00da57561 Issue #26194: Inserting into a full deque to raise an IndexError 2016-02-01 21:19:22 -08:00
Serhiy Storchaka
8abaa9ab34 Issue #19883: Fixed possible integer overflows in zipimport. 2016-01-28 21:32:39 +02:00
Serhiy Storchaka
d5db57396b Issue #19883: Fixed possible integer overflows in zipimport. 2016-01-28 21:30:16 +02:00
Serhiy Storchaka
b49a1edc15 Merge heads 2016-01-28 19:56:40 +02:00
Serhiy Storchaka
d2557a67d8 Issue #26198: Added tests for "es", "et", "es#", "et#" and "C" format units
of PyArg_Parse*() functions.
2016-01-28 19:51:26 +02:00
Serhiy Storchaka
c8241fdde7 Issue #26198: Added tests for "es", "et", "es#", "et#" and "C" format units
of PyArg_Parse*() functions.
2016-01-28 19:49:54 +02:00
Victor Stinner
c8d2fb4112 Merge 3.5: Issue #26227 2016-01-28 15:44:10 +01:00
Victor Stinner
7240030c52 Windows: Decode hostname from ANSI code page
Issue #26227: On Windows, getnameinfo(), gethostbyaddr() and gethostbyname_ex()
functions of the socket module now decode the hostname from the ANSI code page
rather than UTF-8.
2016-01-28 15:41:01 +01:00
Raymond Hettinger
0ef0423cb2 merge 2016-01-26 21:46:03 -08:00
Raymond Hettinger
3743432302 Issue #26194: Fix undefined behavior for deque.insert() when len(d) == maxlen 2016-01-26 21:44:16 -08:00
Raymond Hettinger
1ce6885f8a Fix compiler warning about obviously unreachable code. 2016-01-24 22:15:20 -08:00
Raymond Hettinger
306d6b1ea6 Convert another post-decrement while-loop to pre-decrement for consistency
and better generated code (on both GCC and CLang).
2016-01-24 12:40:42 -08:00
Raymond Hettinger
165eee214b Convert two other post-decrement while-loops to pre-decrements for consistency
and for better code generation.
2016-01-24 11:32:07 -08:00
Raymond Hettinger
d84ec225bd Miscellaneous refactorings
* Add comment to the maxlen structure entry about the meaning of maxlen == -1
* Factor-out code common to deque_append(left) and deque_extend(left)
* Factor inner-loop in deque_clear() to use only 1 test per loop instead of 2
* Tighten inner-loops for deque_item() and deque_ass_item() so that the
  compiler can combine the decrement and test into a single step.
2016-01-24 09:12:06 -08:00
Benjamin Peterson
ae8c078dbb merge 3.5 2016-01-21 22:04:04 -08:00
Benjamin Peterson
d52513cb22 merge 3.4 2016-01-21 22:03:55 -08:00
Benjamin Peterson
b1db758061 reject negative data_size 2016-01-21 22:02:46 -08:00
Benjamin Peterson
2b0b5ac5a0 merge 3.5 (#26171) 2016-01-20 22:25:40 -08:00
Benjamin Peterson
47b8ba22e3 merge 3.4 (#26171) 2016-01-20 22:25:06 -08:00
Benjamin Peterson
c4032da201 prevent buffer overflow in get_data (closes #26171) 2016-01-20 22:23:44 -08:00
Benjamin Peterson
ba77788bba merge 3.5 2016-01-20 22:07:50 -08:00
Benjamin Peterson
d4d7737c3f merge 3.4 2016-01-20 22:07:43 -08:00
Benjamin Peterson
ef9cf08352 fix refleak in error condition 2016-01-20 22:06:43 -08:00
Victor Stinner
b56837a033 Merge 3.5
Issue #26154: Add a new private _PyThreadState_UncheckedGet() function.
2016-01-20 11:19:46 +01:00
Victor Stinner
bfd316e750 Add _PyThreadState_UncheckedGet()
Issue #26154: Add a new private _PyThreadState_UncheckedGet() function which
gets the current thread state, but don't call Py_FatalError() if it is NULL.

Python 3.5.1 removed the _PyThreadState_Current symbol from the Python C API to
no more expose complex and private atomic types. Atomic types depends on the
compiler or can even depend on compiler options. The new function
_PyThreadState_UncheckedGet() allows to get the variable value without having
to care of the exact implementation of atomic types.

Changes:

* Replace direct usage of the _PyThreadState_Current variable with a call to
  _PyThreadState_UncheckedGet().
* In pystate.c, replace direct usage of the _PyThreadState_Current variable
  with the PyThreadState_GET() macro for readability.
* Document also PyThreadState_Get() in pystate.h
2016-01-20 11:12:38 +01:00
Serhiy Storchaka
9cc4ed5c7a Issue #26129: Deprecated accepting non-integers in grp.getgrgid(). 2016-01-18 18:49:57 +02:00
Georg Brandl
4b5b06203e Fix indentation of continuation lines. 2016-01-18 08:00:15 +01:00
Stefan Krah
5f6ccc787e Issue #26139: libmpdec: disable /W4 warning (non-standard dllimport behavior). 2016-01-17 12:28:43 +01:00
Brett Cannon
43cfd8240c Merge for issue #17633 2016-01-15 11:23:46 -08:00
Brett Cannon
56aae8f304 Issue #17633: Improve support for namespace packages with zipimport.
Previously zipimport mistakenly limited namespace support to only the
top-level of the zipfile when it should have supported an arbitrary
depth.

Thanks to Phil Connel for the bug report and initial patch and Mike
Romberg for the final patch.
2016-01-15 11:22:19 -08:00