summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Issue #18342: Use the repr of a module name for ``from ... importBrett Cannon2013-07-124-1/+13
| | | | | | | | ...`` when an ImportError occurs. Other cases had already been switched over to using the repr. Thanks to Tomasz Maćkowiak for the patch.
* Issue #18415: Normalize what type of quotes are used with stringBrett Cannon2013-07-122-36/+36
| | | | | | | constants in importlib._bootstrap. Along the way clean up from string interpolation to use the repr explicitly. Initial patch by Madison May.
* Issue #18408: Fix constructors of _elementtree.cVictor Stinner2013-07-121-12/+15
| | | | | | * Use Py_DECREF() instead of PyObject_GC_Del() to release correctly all resources * Raise MemoryError on memory allocation failure
* Issue #18408: Fix create_extra() of _elementtree.c, raise MemoryError on memoryVictor Stinner2013-07-121-1/+3
| | | | allocation failure
* Issue #18408: parser module: fix error handling in node2tuple()Victor Stinner2013-07-111-28/+52
| | | | Handle PyLong_FromLong() and PyUnicode_FromString() failures
* Issue #18408: Fix parser.sequence2st() and parser.tuple2st(): raise MemoryErrorVictor Stinner2013-07-111-4/+15
| | | | | | on memory allocation failure Instead of ignoring the memory allocation failure and create invalid objects.
* Issue #18408: _pickle.c: Add missing PyErr_NoMemory() on memory allocation ↵Victor Stinner2013-07-111-2/+7
| | | | failures
* Issue #18408: _PyMemoTable_ResizeTable() now restores the old table ifVictor Stinner2013-07-111-1/+1
| | | | | | allocating a bigger table failed PyMemoTable destructor does crash if mt_table is NULL.
* Issue #18408: pmerge() help of mro_implementation() now raises MemoryError onVictor Stinner2013-07-111-2/+4
| | | | | | | memory allocation failure Replace also PyMem_Free() with PyMem_FREE() to be consistent with the rest of the function.
* Issue #18408: errors.c: in debug mode, calling PyErr_BadInternalCall() nowVictor Stinner2013-07-111-0/+1
| | | | fails with an assertion error
* Issue #18408: ceval.c: in debug mode, convert the PyErr_Occurred() check onVictor Stinner2013-07-111-0/+4
| | | | exception (when getting NULL) to an assertion to detect bugs earlier
* Issue #18408: Oh, I was wrong: Pickler_New() must call Py_DECREF() to destroyVictor Stinner2013-07-111-1/+1
| | | | the newly created pickler, and not PyObject_GC_Del().
* Issue #18408: normalizestring() now raises MemoryError on memory allocation ↵Victor Stinner2013-07-111-1/+1
| | | | failure
* Issue #18408: In debug mode, PyCFunction_Call() now checks if an exception wasVictor Stinner2013-07-111-7/+23
| | | | | raised if the result is NULL to help to find bugs in C mode (get the error earlier than the SystemError in ceval.c).
* Issue #18408: parsetok() must not write into stderr on memory allocation errorVictor Stinner2013-07-111-1/+0
| | | | The caller gets an error code and can raise a classic Python exception.
* Issue #18408: Different fixes in _elementtree.c to handle correctly MemoryErrorVictor Stinner2013-07-111-8/+14
| | | | | | | | | | * create_new_element() initializes all attributes before handling errors, to fix a crash in the destructor * create_new_element() calls PyObject_GC_Del() on error, instead of PyObject_Del(), because the object was created by PyObject_GC_New() * subelement() now handles create_new_element() failure * element_getattro() now handles element_get_text() failure * makeuniversal() now handles PyBytes_FromStringAndSize() failure
* Cleanup _elementtree.cVictor Stinner2013-07-111-7/+6
|
* Issue #18408: _elementtree.c now handles create_extra() failureVictor Stinner2013-07-111-12/+24
|
* Issue #18408: Fix _Pickler_New() and _Unpickler_New(): initialize allVictor Stinner2013-07-111-22/+14
| | | | | | | | | attributes before handling errors _Pickler_New() now calls PyObject_GC_Del() instead of Py_DECREF() on error, because the pickle object is created using PyObject_GC_New(). Fix a crash in the destructor when an attribute is not initiallized.
* Issue #18408: parsetok() must not write into stderr on memory allocation errorVictor Stinner2013-07-111-1/+0
| | | | The caller gets an error code and can raise a classic Python exception.
* Issue #18408: Fix compiler_import() to handle PyUnicode_Substring() failure ↵Victor Stinner2013-07-111-1/+4
| | | | properly
* Issue #18408: ste_new() initialize all attributes before handling errorVictor Stinner2013-07-111-13/+9
| | | | If an attribute is not initialized, the destructor can crash
* Issue #18408: slot_tp_str() must not fallback on slot_tp_repr() on errorVictor Stinner2013-07-111-19/+2
| | | | | | | | | type->tp_str must not point to slot_tp_str() if type has no __str__ attribute, so there is no reason for slot_tp_str() to fallback on slot_tp_str() on lookup error. Moreover, calling PyErr_Clear() may hide a real bug like MemoryError. If __str__ attribute is removed, slots must be updated (which is done by type_setattro()).
* typeobject.c: remove trailing spacesVictor Stinner2013-07-111-3/+3
|
* Merge: #18044: Fix parsing of encoded words of the form =?utf8?q?=XX...?=R David Murray2013-07-115-40/+62
|\
| * #18044: Fix parsing of encoded words of the form =?utf8?q?=XX...?=R David Murray2013-07-115-40/+62
| | | | | | | | | | | | | | | | | | | | The problem was I was only checking for decimal digits after the third '?', not for *hex* digits :(. This changeset also fixes a couple of comment typos, deletes an unused function relating to encoded word parsing, and removed an invalid 'if' test from the folding function that was revealed by the tests written to validate this issue.
* | Issue #17872: Fix a segfault in marshal.load() when input stream returnsSerhiy Storchaka2013-07-113-15/+35
|\ \ | |/ | | | | more bytes than requested.
| * Issue #17872: Fix a segfault in marshal.load() when input stream returnsSerhiy Storchaka2013-07-113-15/+35
| | | | | | | | more bytes than requested.
* | Issue #18085: Add missed const modifier for some entries in refcounts.dat.Serhiy Storchaka2013-07-111-76/+76
|\ \ | |/
| * Issue #18085: Add missed const modifier for some entries in refcounts.dat.Serhiy Storchaka2013-07-111-77/+77
| |
* | Issue #18101: Tcl.split() now process strings nested in a tuple as itSerhiy Storchaka2013-07-113-0/+78
|\ \ | |/ | | | | | | | | do with byte strings. Added tests for Tcl.split() and Tcl.splitline().
| * Issue #18101: Tcl.split() now process strings nested in a tuple as itSerhiy Storchaka2013-07-113-0/+78
| | | | | | | | | | | | do with byte strings. Added tests for Tcl.split() and Tcl.splitline().
* | Issue #18338: `python --version` now prints version string to stdout, andSerhiy Storchaka2013-07-113-3/+8
| | | | | | | | not to stderr. Patch by Berker Peksag and Michael Dickens.
* | Merge #17987: properly document support.captured_xxx.R David Murray2013-07-114-16/+47
|\ \ | |/
| * #17987: properly document support.captured_xxx.R David Murray2013-07-114-16/+47
| | | | | | | | Patch by Dmi Baranov.
* | Fix reference leaks introduced by the patch for issue #5308.Serhiy Storchaka2013-07-111-12/+11
|\ \ | |/
| * Fix reference leaks introduced by the patch for issue #5308.Serhiy Storchaka2013-07-111-12/+11
| |
* | Issue #18336. Fix a link to StreamReader's read() method.Serhiy Storchaka2013-07-111-1/+1
|\ \ | |/
| * Issue #18336. Fix a link to StreamReader's read() method.Serhiy Storchaka2013-07-111-1/+1
| |
* | Issue #18426: improve exception message. Courtesy of AmauryChristian Heimes2013-07-111-1/+5
|\ \ | |/
| * Issue #18426: improve exception message. Courtesy of AmauryChristian Heimes2013-07-111-1/+5
| |
* | Issue #18426: Fix NULL pointer dereference in C extension import whenChristian Heimes2013-07-112-0/+5
|\ \ | |/ | | | | PyModule_GetDef() returns an error.
| * Issue #18426: Fix NULL pointer dereference in C extension import whenChristian Heimes2013-07-112-0/+5
| | | | | | | | PyModule_GetDef() returns an error.
* | #18116: getpass no longer always falls back to stdin.R David Murray2013-07-103-52/+70
| | | | | | | | | | | | | | | | 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.)
* | Merge: #18424: PEP8ify the tense of the sum docstring.R David Murray2013-07-101-2/+2
|\ \ | |/
| * #18424: PEP8ify the tense of the sum docstring.R David Murray2013-07-101-2/+2
| |
* | Merge: #18399: fix comment typo.R David Murray2013-07-101-1/+1
|\ \ | |/
| * #18399: fix comment typo.R David Murray2013-07-101-1/+1
| | | | | | | | Patch by Andrew Rowe.
* | Issue #18408: Fix call_exc_trace(): if the traceback is NULL, use None whenVictor Stinner2013-07-101-3/+8
| | | | | | | | | | | | building the tuple (type, value, traceback) passed to the callback. PyTuple_Pack() does crash if an argument is NULL.
* | Issue #18308: don't take the scope ID into account when comparing IPv6Charles-François Natali2013-07-091-1/+5
|\ \ | |/ | | | | addresses.