Commit Graph

79679 Commits

Author SHA1 Message Date
R David Murray e173d01231 Merge #17987: properly document support.captured_xxx. 2013-07-11 12:29:31 -04:00
R David Murray 5a33f81348 #17987: properly document support.captured_xxx.
Patch by Dmi Baranov.
2013-07-11 12:28:40 -04:00
Serhiy Storchaka a155d40ed5 Fix reference leaks introduced by the patch for issue #5308. 2013-07-11 19:19:47 +03:00
Serhiy Storchaka dfde2151ed Fix reference leaks introduced by the patch for issue #5308. 2013-07-11 19:14:26 +03:00
Serhiy Storchaka 491856074f Issue #18336. Fix a link to StreamReader's read() method. 2013-07-11 18:27:20 +03:00
Serhiy Storchaka cca40ffa97 Issue #18336. Fix a link to StreamReader's read() method. 2013-07-11 18:26:13 +03:00
Christian Heimes 6cee994674 Issue #18426: improve exception message. Courtesy of Amaury 2013-07-11 13:02:37 +02:00
Christian Heimes 7ce57d67c9 Issue #18426: improve exception message. Courtesy of Amaury 2013-07-11 13:02:30 +02:00
Christian Heimes 5ec44649df Issue #18426: Fix NULL pointer dereference in C extension import when
PyModule_GetDef() returns an error.
2013-07-11 11:23:34 +02:00
Christian Heimes 848ee099f5 Issue #18426: Fix NULL pointer dereference in C extension import when
PyModule_GetDef() returns an error.
2013-07-11 11:22:21 +02:00
R David Murray 16dbbae298 #18116: getpass no longer always falls back to stdin.
Also fixes a resource warning that occurred when the fallback is taken.

Patch by Serhiy Storchaka.

(We couldn't figure out how to write tests for this.)
2013-07-10 17:02:24 -04:00
R David Murray acb362e29f Merge: #18424: PEP8ify the tense of the sum docstring. 2013-07-10 16:22:59 -04:00
R David Murray 87ead1138d #18424: PEP8ify the tense of the sum docstring. 2013-07-10 16:22:14 -04:00
R David Murray 609142ef05 Merge: #18399: fix comment typo. 2013-07-10 11:57:39 -04:00
R David Murray 296b73c83d #18399: fix comment typo.
Patch by Andrew Rowe.
2013-07-10 10:57:39 -04:00
Victor Stinner aaa8ed8b84 Issue #18408: Fix call_exc_trace(): if the traceback is NULL, use None when
building the tuple (type, value, traceback) passed to the callback.

PyTuple_Pack() does crash if an argument is NULL.
2013-07-10 13:57:55 +02:00
Charles-François Natali 19361a2046 Issue #18308: don't take the scope ID into account when comparing IPv6
addresses.
2013-07-09 19:16:32 +02:00
Charles-François Natali 37114bb548 Issue #18308: don't take the scope ID into account when comparing IPv6
addresses.
2013-07-09 19:15:43 +02:00
Christian Heimes 273c292dfa use $(LN) makefile variable instead of ln 2013-07-09 14:30:22 +02:00
Christian Heimes ae6275d8c8 use $(LN) makefile variable instead of ln 2013-07-09 14:30:04 +02:00
Raymond Hettinger d9c116ca40 Add a spacing saving heuristic to deque's extend methods 2013-07-09 00:13:21 -07:00
Victor Stinner bbf8ce5b87 Issue #18408: Fix select.select() to handle PyList_New() failure (MemoryError)
in set2list()
2013-07-09 00:49:03 +02:00
Victor Stinner c4266360fc Issue #18408: Fix _PyMem_DebugRealloc()
Don't mark old extra memory dead before calling realloc(). realloc() can fail
and realloc() must not touch the original buffer on failure.

So mark old extra memory dead only on success if the new buffer did not move
(has the same address).
2013-07-09 00:44:43 +02:00
Victor Stinner 9e6b4d715c Issue #18408: _PyUnicodeWriter_Finish() now clears its buffer attribute in all
cases, so _PyUnicodeWriter_Dealloc() can be called after finish.
2013-07-09 00:37:24 +02: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 e0af3a802a Issue #18408: Fix PyCode_Optimize(): raise a MemoryError on memory allocation
failure.
2013-07-09 00:32:04 +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 3f15cf0961 Issue #18408: Fix ConvParam() of the ctypes module to handle paramfunc failure
(MemoryError).
2013-07-09 00:27:12 +02:00
Ned Deily 78094ac53e Avoid spurious non-fatal install errors for OS X frameworks:
for a framework install, the python shared library is installed in
the frameworkinstallstructure target, not in altbininstall.
2013-07-08 14:33:03 -07:00
Victor Stinner 15a0bd3965 Issue #18408: Fix _PyUnicodeWriter_Finish(): clear writer->buffer,
so _PyUnicodeWriter_Dealloc() can be called on the writer after finish.
2013-07-08 22:29:55 +02:00
Victor Stinner 064bbdc79b fix indentation 2013-07-08 22:28:27 +02:00
Victor Stinner 0ff0f54dd4 Issue #18408: Fix call_function() of ceval.c to handle PyTuple_New() failure
(in load_args()), ex: MemoryError.
2013-07-08 22:27:42 +02:00
Victor Stinner 9812af8e72 Issue #18408: Fix PyType_Ready() and type.__bases__ setter to handle
PyWeakref_NewRef() failure (ex: MemoryError).
2013-07-08 22:25:48 +02:00
Victor Stinner 3a8b79d4d2 Issue #18408: Fix marshal reader for Unicode strings: handle
PyUnicode_DecodeUTF8() failure (ex: MemoryError).
2013-07-08 22:23:32 +02:00
Victor Stinner b27cd3e5ad Issue #18408: Fix list.pop() to handle list_resize() failure (MemoryError). 2013-07-08 22:20:44 +02:00
Victor Stinner c9b7f51ec2 Issue #18408: Fix PyDict_New() to handle correctly new_keys_object() failure
(MemoryError).
2013-07-08 22:19:20 +02:00
Victor Stinner 5d1866c78a Issue #18408: PyObject_GC_NewVar() now raises SystemError exception if nitems
is negative
2013-07-08 22:17:52 +02:00
Victor Stinner c1eb26cd2f gcmodule.c: strip trailing spaces 2013-07-08 22:15:05 +02:00
Ezio Melotti d95bb3f981 #18403: merge with 3.3. 2013-07-08 17:53:32 +02:00
Ezio Melotti 93dd6934ff #18403: fix an off-by-one typo noticed by Xue Fuqiao. 2013-07-08 17:52:54 +02:00
Ezio Melotti bf5af5d5bc Merge str.center tests from 3.3. 2013-07-08 17:49:59 +02:00
Ezio Melotti f84e01df31 Add a couple of tests for str.center with non-ASCII chars. 2013-07-08 17:48:29 +02:00
Victor Stinner 49fc8ece81 Issue #18203: Add _PyMem_RawStrdup() and _PyMem_Strdup()
Replace strdup() with _PyMem_RawStrdup() or _PyMem_Strdup(), depending if the
GIL is held or not.
2013-07-07 23:30:24 +02:00
Victor Stinner 6f8eeee7b9 Issue #18203: Fix _Py_DecodeUTF8_surrogateescape(), use PyMem_RawMalloc() as _Py_char2wchar() 2013-07-07 22:57:45 +02:00
Christian Heimes fa535f5220 Issue #18227: pyexpat now uses a static XML_Memory_Handling_Suite. cElementTree uses the same approach since at least Python 2.6 2013-07-07 17:35:11 +02:00
Victor Stinner 0e2d3cf2cb Issue #18203: Replace malloc() with PyMem_Malloc() in _PySequence_BytesToCharpArray() 2013-07-07 17:22:41 +02:00
Victor Stinner c6632e7eb4 Issue #18203: Replace malloc() with PyMem_Malloc() to allocate arena objects 2013-07-07 17:18:53 +02:00
Victor Stinner 80aa565fb4 Issue #18203: Replace malloc() with PyMem_RawMalloc() to allocate thread locks 2013-07-07 17:17:59 +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 11ebff2757 Issue #18203: Replace malloc() with PyMem_Malloc() in _ssl for the password 2013-07-07 17:07:52 +02:00