Commit Graph

79815 Commits

Author SHA1 Message Date
Victor Stinner 0b142e2809 Issue #18408: Fix array_index(), handle getarrayitem() failure 2013-07-17 23:01:30 +02:00
Victor Stinner 08a80b11ad longobject.c: add an assertion to ensure that MEDIUM_VALUE() is only called on
small integers (0 or 1 digit)
2013-07-17 22:33:42 +02:00
Victor Stinner 8aed6f1c7d Issue #18408: Rewrite NEGATE() macro in longobject.c to handle PyLong_FromLong() failure 2013-07-17 22:31:17 +02:00
Victor Stinner 5967bf4928 Issue #18408: Fix PyType_Ready(), handle _PyDict_SetItemId() failure 2013-07-17 22:01:37 +02:00
Victor Stinner e901d1fbdf Issue #18408: Fix Py_ReprEnter(), handle PyList_Append() failure 2013-07-17 21:58:41 +02:00
Victor Stinner 095d99ffff Issue #18408: Fix listpop(), handle list_ass_slice() failure 2013-07-17 21:58:01 +02:00
Victor Stinner 479054bca7 Issue #18408: Fix PyErr_SetImportError(), handle PyDict_SetItemString() failure 2013-07-17 21:54:25 +02:00
Victor Stinner 8e54b1c448 Issue #18408: Fix _PyImport_LoadDynamicModule(), handle PyUnicode_FromFormat() failure 2013-07-17 21:53:23 +02:00
Victor Stinner 0fae8f9083 Issue #18408: Fix ast_for_atom(), PyErr_Fetch(&type, &value, &tback) can set value to NULL 2013-07-17 21:51:42 +02:00
Victor Stinner 764a46d2ed Issue #18408: Fix heapq.heappop(), handle PyList_SetSlice() failure 2013-07-17 21:50:21 +02:00
Victor Stinner 2ff51b83b8 Issue #18408: Fix time.tzset(), detect exception when calling PyInit_timezone() 2013-07-17 21:42:45 +02:00
Victor Stinner 9a146eeadb Issue #18408: Fix structseq_reduce(), handle PyDict_SetItemString() failure 2013-07-17 13:41:39 +02:00
Serhiy Storchaka e5553142d4 Issue #18266: test_largefile now works with unittest test discovery and
supports running only selected tests.  Patch by Zachary Ware.
2013-07-17 13:44:17 +03:00
Serhiy Storchaka c406a121f7 Issue #18266: test_largefile now works with unittest test discovery and
supports running only selected tests.  Patch by Zachary Ware.
2013-07-17 13:42:24 +03:00
Serhiy Storchaka cb478b72a3 Issue #17767: test_locale now works with unittest test discovery.
Original patch by Zachary Ware.
2013-07-17 13:26:48 +03:00
Serhiy Storchaka 880254e222 Issue #17767: test_locale now works with unittest test discovery.
Original patch by Zachary Ware.
2013-07-17 13:23:45 +03:00
Victor Stinner 26f91999b4 Close #18469: Replace PyDict_GetItemString() with _PyDict_GetItemId() in structseq.c
_PyDict_GetItemId() is more efficient: it only builds the Unicode string once.
Identifiers (dictionary keys) are now created at Python initialization, and if
the creation failed, Python does exit with a fatal error.

Before, PyDict_GetItemString() failure was not handled: structseq_new() could
call PyObject_GC_NewVar() with a negative size, and structseq_dealloc() could
also crash.
2013-07-17 01:22:45 +02:00
Victor Stinner b8f602a60a Issue #18408: Mention changes in Misc/NEWS 2013-07-17 01:10:04 +02:00
Victor Stinner 43d8195a70 Issue #18408: Handle PyArena_AddPyObject() failure in ast.c
PyList_Append() (called by PyArena_AddPyObject()) can fail because of a
MemoryError for example.
2013-07-17 00:57:58 +02:00
Victor Stinner d594f24fbc Issue #18408: Fix locale.localeconv(), handle PyDict_SetItemString() failure 2013-07-17 00:55:57 +02:00
Victor Stinner 74a7fa6663 Issue #18408: Fix PyErr_NormalizeException(), handle PyObject_IsSubclass() failure
PyObject_IsSubclass() can fail and raise a new exception!
2013-07-17 00:44:53 +02:00
Victor Stinner bdf630c4a7 Issue #18408: Fix Python-ast.c: handle init_types() failure (ex: MemoryError) 2013-07-17 00:17:15 +02:00
Victor Stinner 6684bdf73d Issue #18408: Fix typo in build_node_tree() of the parser module
Type "o" format of Py_BuildValue() is invalid: it must be "O".
2013-07-17 00:13:52 +02:00
Victor Stinner 3997cfdb7f Cleanup type_call() to ease debug
It was easy to miss the call to type->tp_init because it was done in a long
conditional expression. Split the long expression in multiple lines to make the
debug step by step easier.
2013-07-16 22:51:21 +02:00
Victor Stinner 1e53bbaced Issue #18408: handle PySys_GetObject() failure, raise a RuntimeError 2013-07-16 22:26:05 +02:00
Victor Stinner 1b63493ed1 Issue #18408: Py_ReprLeave() now saves/restores the current exception,
and ignores exceptions raised during the call
2013-07-16 22:24:44 +02:00
Victor Stinner ac2a4fe8a2 Issue #18408: dict_new() now fails on new_keys_object() error
Pass the MemoryError exception to the caller, instead of using empty keys.
2013-07-16 22:19:00 +02:00
Victor Stinner a9f61a5a23 Cleanup dictobject.c 2013-07-16 22:17:26 +02:00
Victor Stinner fdcbab9602 Issue #18408: Fix PyDict_GetItemString(), suppress PyUnicode_FromString() error
As PyDict_GetItem(), PyDict_GetItemString() suppresses all errors that may
occur for historical reasons.
2013-07-16 22:16:05 +02:00
Victor Stinner 32fd6eab1e Issue #18408: Fix list.extend(), handle list_resize() failure 2013-07-16 21:45:58 +02:00
Victor Stinner d1f9942ae3 Issue #18408: Fix cjkcodecs decoders, add a new MBERR_EXCEPTION constant to
notify exceptions raised by the _PyUnicodeWriter API
2013-07-16 21:41:43 +02:00
Victor Stinner 85c761d3d3 Issue #18408: Fix fileio_read() on _PyBytes_Resize() failure
bytes is NULL on _PyBytes_Resize() failure
2013-07-16 21:36:02 +02:00
Serhiy Storchaka 8361617fad Issue #18448: Fix a typo in Tools/demo/eiffel.py. 2013-07-16 22:14:03 +03:00
Serhiy Storchaka 6a98fe9edd Issue #18448: Fix a typo in Tools/demo/eiffel.py. 2013-07-16 22:12:03 +03:00
Serhiy Storchaka c9b3f6f5ef Issue #18457: Fixed saving of formulas and complex numbers in Tools/demo/ss1.py.
Useed context managers for file I/O.
Removed out-of-dated code and misleading comments.
2013-07-16 21:58:37 +03:00
Serhiy Storchaka ec7ddd9028 Issue #18457: Fixed saving of formulas and complex numbers in Tools/demo/ss1.py.
Useed context managers for file I/O.
Removed out-of-dated code and misleading comments.
2013-07-16 21:55:36 +03:00
R David Murray 743e3d5139 Merge: Closes #18475: add unittest.main() to test_email/test_inversions. 2013-07-16 11:46:00 -04:00
R David Murray b5c9dfdab3 Closes #18475: add unittest.main() to test_email/test_inversions.
Patch by Vajrasky Kok.
2013-07-16 11:45:31 -04:00
Richard Oudkerk a84a7cb06b Issue #17778: Fix test discovery for test_multiprocessing. (Patch by
Zachary Ware.)
2013-07-16 15:57:16 +01:00
Richard Oudkerk d15642e428 Issue #17778: Fix test discovery for test_multiprocessing. (Patch by
Zachary Ware.)
2013-07-16 15:33:41 +01:00
Ronald Oussoren e6f2175afb Also remove a (broken) leaker test for the code removed in issue #18393. 2013-07-16 08:32:05 +02:00
Benjamin Peterson cb2226cb69 merge 3.3 2013-07-15 20:50:25 -07:00
Benjamin Peterson 265fba40c8 move declaration to top of block 2013-07-15 20:50:22 -07:00
Benjamin Peterson fd9c0203de merge 3.3 (closes #18470) 2013-07-15 20:47:47 -07:00
Benjamin Peterson 2dbfd88245 check the return value of new_string() (closes #18470) 2013-07-15 19:15:34 -07:00
Ned Deily eaaedcdd89 Closes #18471: Fix typo in heapq documentation (reported by François Pinard). 2013-07-15 19:09:27 -07:00
Ned Deily 676d7aa905 Issue #18471: Fix typo in heapq documentation (reported by François Pinard). 2013-07-15 19:08:13 -07:00
Victor Stinner 78e2c985ac Issue #18408: Fix show_warning(), clear also the exception raised by
_Py_DisplaySourceLine()

For example, _PyGC_DumpShutdownStats() calls PyErr_WarnExplicitFormat() while
the import machinery does not work anymore, _Py_DisplaySourceLine() fails when
trying to import the io module.
2013-07-16 01:54:37 +02:00
Victor Stinner f243ee4055 Issue #18408: add more assertions on PyErr_Occurred() in ceval.c to detect bugs
earlier
2013-07-16 01:02:12 +02:00
Victor Stinner ceceaa00ba Issue #18408: Fix _Py_DisplaySourceLine()
Report _Py_FindSourceFile() error, so the error is cleared;
and clear io.open(filename) exception on failure.
2013-07-16 00:32:14 +02:00