]>
granicus.if.org Git - python/log
Victor Stinner [Thu, 18 Jul 2013 21:17:01 +0000 (23:17 +0200)]
Issue #18501, #18408: Fix expat handlers in pyexpat, don't call Python
functions if a Python exception was raised
Victor Stinner [Thu, 18 Jul 2013 20:46:14 +0000 (22:46 +0200)]
Issue #18408: Fix _elementtree.c, don't call Python function from an expat
handler if a Python exception is set
Victor Stinner [Thu, 18 Jul 2013 00:43:47 +0000 (02:43 +0200)]
Fix a compiler warning on FreeBSD
Modules/python.c:40: warning: ISO C90 forbids mixed declarations and code
Victor Stinner [Thu, 18 Jul 2013 00:31:21 +0000 (02:31 +0200)]
Issue #18408: Fix PyInit__curses_panel(), handle import_curses() failure
Don't call PyErr_NewException() if an exception is set, or type_call() would
fail with an assertion error.
Victor Stinner [Wed, 17 Jul 2013 23:49:30 +0000 (01:49 +0200)]
Issue #18408: PyObject_Str(), PyObject_Repr() and type_call() now fail with an
assertion error if they are called with an exception set (PyErr_Occurred()).
As PyEval_EvalFrameEx(), they may clear the current exception and so the caller
looses its exception.
Victor Stinner [Wed, 17 Jul 2013 23:54:37 +0000 (01:54 +0200)]
Issue #18408: Fix _pysqlite_fetch_one_row(), in debug mode, don't call
type_call() with an exception set
Victor Stinner [Wed, 17 Jul 2013 23:41:08 +0000 (01:41 +0200)]
Issue #18408: PyEval_EvalFrameEx() and PyEval_CallObjectWithKeywords() now fail
with an assertion error if they are called with an exception set
(PyErr_Occurred()).
If these functions are called with an exception set, the exception may be
cleared and so the caller looses its exception.
Add also assertions to PyEval_CallObjectWithKeywords() and call_function() to
check if the function succeed with no exception set, or the function failed
with an exception set.
Victor Stinner [Wed, 17 Jul 2013 23:42:04 +0000 (01:42 +0200)]
Issue #18488: _pysqlite_final_callback() should not clear the exception set by
the last call to the step() method of a user function
Victor Stinner [Wed, 17 Jul 2013 23:00:45 +0000 (01:00 +0200)]
Issue #18408: Fix dict_repr(), don't call PyObject_Repr() with an exception set
PyObject_Repr() can removes the current exception. For example, module_repr()
calls PyErr_Clear() if calling loader.module_repr(mod) failed.
Victor Stinner [Wed, 17 Jul 2013 23:12:35 +0000 (01:12 +0200)]
Issue #18408: Fix array_tolist(), handle PyList_SetItem() failure
Victor Stinner [Wed, 17 Jul 2013 21:01:30 +0000 (23:01 +0200)]
Issue #18408: Fix array_index(), handle getarrayitem() failure
Victor Stinner [Wed, 17 Jul 2013 20:33:42 +0000 (22:33 +0200)]
longobject.c: add an assertion to ensure that MEDIUM_VALUE() is only called on
small integers (0 or 1 digit)
Victor Stinner [Wed, 17 Jul 2013 20:31:17 +0000 (22:31 +0200)]
Issue #18408: Rewrite NEGATE() macro in longobject.c to handle PyLong_FromLong() failure
Victor Stinner [Wed, 17 Jul 2013 20:01:37 +0000 (22:01 +0200)]
Issue #18408: Fix PyType_Ready(), handle _PyDict_SetItemId() failure
Victor Stinner [Wed, 17 Jul 2013 19:58:41 +0000 (21:58 +0200)]
Issue #18408: Fix Py_ReprEnter(), handle PyList_Append() failure
Victor Stinner [Wed, 17 Jul 2013 19:58:01 +0000 (21:58 +0200)]
Issue #18408: Fix listpop(), handle list_ass_slice() failure
Victor Stinner [Wed, 17 Jul 2013 19:54:25 +0000 (21:54 +0200)]
Issue #18408: Fix PyErr_SetImportError(), handle PyDict_SetItemString() failure
Victor Stinner [Wed, 17 Jul 2013 19:53:23 +0000 (21:53 +0200)]
Issue #18408: Fix _PyImport_LoadDynamicModule(), handle PyUnicode_FromFormat() failure
Victor Stinner [Wed, 17 Jul 2013 19:51:42 +0000 (21:51 +0200)]
Issue #18408: Fix ast_for_atom(), PyErr_Fetch(&type, &value, &tback) can set value to NULL
Victor Stinner [Wed, 17 Jul 2013 19:50:21 +0000 (21:50 +0200)]
Issue #18408: Fix heapq.heappop(), handle PyList_SetSlice() failure
Victor Stinner [Wed, 17 Jul 2013 19:42:45 +0000 (21:42 +0200)]
Issue #18408: Fix time.tzset(), detect exception when calling PyInit_timezone()
Victor Stinner [Wed, 17 Jul 2013 11:41:39 +0000 (13:41 +0200)]
Issue #18408: Fix structseq_reduce(), handle PyDict_SetItemString() failure
Serhiy Storchaka [Wed, 17 Jul 2013 10:44:17 +0000 (13:44 +0300)]
Issue #18266: test_largefile now works with unittest test discovery and
supports running only selected tests. Patch by Zachary Ware.
Serhiy Storchaka [Wed, 17 Jul 2013 10:42:24 +0000 (13:42 +0300)]
Issue #18266: test_largefile now works with unittest test discovery and
supports running only selected tests. Patch by Zachary Ware.
Serhiy Storchaka [Wed, 17 Jul 2013 10:26:48 +0000 (13:26 +0300)]
Issue #17767: test_locale now works with unittest test discovery.
Original patch by Zachary Ware.
Serhiy Storchaka [Wed, 17 Jul 2013 10:23:45 +0000 (13:23 +0300)]
Issue #17767: test_locale now works with unittest test discovery.
Original patch by Zachary Ware.
Victor Stinner [Tue, 16 Jul 2013 23:22:45 +0000 (01:22 +0200)]
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.
Victor Stinner [Tue, 16 Jul 2013 23:10:04 +0000 (01:10 +0200)]
Issue #18408: Mention changes in Misc/NEWS
Victor Stinner [Tue, 16 Jul 2013 22:57:58 +0000 (00:57 +0200)]
Issue #18408: Handle PyArena_AddPyObject() failure in ast.c
PyList_Append() (called by PyArena_AddPyObject()) can fail because of a
MemoryError for example.
Victor Stinner [Tue, 16 Jul 2013 22:55:57 +0000 (00:55 +0200)]
Issue #18408: Fix locale.localeconv(), handle PyDict_SetItemString() failure
Victor Stinner [Tue, 16 Jul 2013 22:44:53 +0000 (00:44 +0200)]
Issue #18408: Fix PyErr_NormalizeException(), handle PyObject_IsSubclass() failure
PyObject_IsSubclass() can fail and raise a new exception!
Victor Stinner [Tue, 16 Jul 2013 22:17:15 +0000 (00:17 +0200)]
Issue #18408: Fix Python-ast.c: handle init_types() failure (ex: MemoryError)
Victor Stinner [Tue, 16 Jul 2013 22:13:52 +0000 (00:13 +0200)]
Issue #18408: Fix typo in build_node_tree() of the parser module
Type "o" format of Py_BuildValue() is invalid: it must be "O".
Victor Stinner [Tue, 16 Jul 2013 20:51:21 +0000 (22:51 +0200)]
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.
Victor Stinner [Tue, 16 Jul 2013 20:26:05 +0000 (22:26 +0200)]
Issue #18408: handle PySys_GetObject() failure, raise a RuntimeError
Victor Stinner [Tue, 16 Jul 2013 20:24:44 +0000 (22:24 +0200)]
Issue #18408: Py_ReprLeave() now saves/restores the current exception,
and ignores exceptions raised during the call
Victor Stinner [Tue, 16 Jul 2013 20:19:00 +0000 (22:19 +0200)]
Issue #18408: dict_new() now fails on new_keys_object() error
Pass the MemoryError exception to the caller, instead of using empty keys.
Victor Stinner [Tue, 16 Jul 2013 20:17:26 +0000 (22:17 +0200)]
Cleanup dictobject.c
Victor Stinner [Tue, 16 Jul 2013 20:16:05 +0000 (22:16 +0200)]
Issue #18408: Fix PyDict_GetItemString(), suppress PyUnicode_FromString() error
As PyDict_GetItem(), PyDict_GetItemString() suppresses all errors that may
occur for historical reasons.
Victor Stinner [Tue, 16 Jul 2013 19:45:58 +0000 (21:45 +0200)]
Issue #18408: Fix list.extend(), handle list_resize() failure
Victor Stinner [Tue, 16 Jul 2013 19:41:43 +0000 (21:41 +0200)]
Issue #18408: Fix cjkcodecs decoders, add a new MBERR_EXCEPTION constant to
notify exceptions raised by the _PyUnicodeWriter API
Victor Stinner [Tue, 16 Jul 2013 19:36:02 +0000 (21:36 +0200)]
Issue #18408: Fix fileio_read() on _PyBytes_Resize() failure
bytes is NULL on _PyBytes_Resize() failure
Serhiy Storchaka [Tue, 16 Jul 2013 19:14:03 +0000 (22:14 +0300)]
Issue #18448: Fix a typo in Tools/demo/eiffel.py.
Serhiy Storchaka [Tue, 16 Jul 2013 19:12:03 +0000 (22:12 +0300)]
Issue #18448: Fix a typo in Tools/demo/eiffel.py.
Serhiy Storchaka [Tue, 16 Jul 2013 18:58:37 +0000 (21:58 +0300)]
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.
Serhiy Storchaka [Tue, 16 Jul 2013 18:55:36 +0000 (21:55 +0300)]
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.
R David Murray [Tue, 16 Jul 2013 15:46:00 +0000 (11:46 -0400)]
Merge: Closes #18475: add unittest.main() to test_email/test_inversions.
R David Murray [Tue, 16 Jul 2013 15:45:31 +0000 (11:45 -0400)]
Closes #18475: add unittest.main() to test_email/test_inversions.
Patch by Vajrasky Kok.
Richard Oudkerk [Tue, 16 Jul 2013 14:57:16 +0000 (15:57 +0100)]
Issue #17778: Fix test discovery for test_multiprocessing. (Patch by
Zachary Ware.)
Richard Oudkerk [Tue, 16 Jul 2013 14:33:41 +0000 (15:33 +0100)]
Issue #17778: Fix test discovery for test_multiprocessing. (Patch by
Zachary Ware.)
Ronald Oussoren [Tue, 16 Jul 2013 06:32:05 +0000 (08:32 +0200)]
Also remove a (broken) leaker test for the code removed in issue #18393.
Benjamin Peterson [Tue, 16 Jul 2013 03:50:25 +0000 (20:50 -0700)]
merge 3.3
Benjamin Peterson [Tue, 16 Jul 2013 03:50:22 +0000 (20:50 -0700)]
move declaration to top of block
Benjamin Peterson [Tue, 16 Jul 2013 03:47:47 +0000 (20:47 -0700)]
merge 3.3 (closes #18470)
Benjamin Peterson [Tue, 16 Jul 2013 02:15:34 +0000 (19:15 -0700)]
check the return value of new_string() (closes #18470)
Ned Deily [Tue, 16 Jul 2013 02:09:27 +0000 (19:09 -0700)]
Closes #18471: Fix typo in heapq documentation (reported by François Pinard).
Ned Deily [Tue, 16 Jul 2013 02:08:13 +0000 (19:08 -0700)]
Issue #18471: Fix typo in heapq documentation (reported by François Pinard).
Victor Stinner [Mon, 15 Jul 2013 23:54:37 +0000 (01:54 +0200)]
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.
Victor Stinner [Mon, 15 Jul 2013 23:02:12 +0000 (01:02 +0200)]
Issue #18408: add more assertions on PyErr_Occurred() in ceval.c to detect bugs
earlier
Victor Stinner [Mon, 15 Jul 2013 22:32:14 +0000 (00:32 +0200)]
Issue #18408: Fix _Py_DisplaySourceLine()
Report _Py_FindSourceFile() error, so the error is cleared;
and clear io.open(filename) exception on failure.
Victor Stinner [Mon, 15 Jul 2013 19:16:27 +0000 (21:16 +0200)]
Issue #18408: Fix PyEval_EvalFrameEx() for MemoryError
Don't pass a NULL traceback to PyException_SetTraceback(): pass Py_None.
Passing NULL would raise a new exception.
Barry Warsaw [Mon, 15 Jul 2013 18:47:29 +0000 (14:47 -0400)]
- Issue #18440: Clarify that `hash()` can truncate the value returned from an
object's custom `__hash__()` method.
Victor Stinner [Mon, 15 Jul 2013 18:00:36 +0000 (20:00 +0200)]
Issue #18408: random_seed() now raises a MemoryError on memory allocation
failure
Victor Stinner [Mon, 15 Jul 2013 17:53:13 +0000 (19:53 +0200)]
test_io: check_interrupted_write() now cancels the alarm if ZeroDivisionError
exception was not raised.
Before the process was killed by SIGALRM in another random test (1 second later)
Victor Stinner [Mon, 15 Jul 2013 17:34:20 +0000 (19:34 +0200)]
Issue #18408: type_new() and PyType_FromSpecWithBases() now raise MemoryError
on memory allocation failure
Victor Stinner [Mon, 15 Jul 2013 16:22:47 +0000 (18:22 +0200)]
Issue #18408: Don't check unicode consistency in _PyUnicode_HAS_UTF8_MEMORY()
and _PyUnicode_HAS_WSTR_MEMORY() macros
These macros are called in unicode_dealloc(), whereas the unicode object can be
"inconsistent" if the creation of the object failed.
For example, when unicode_subtype_new() fails on a memory allocation,
_PyUnicode_CheckConsistency() fails with an assertion error because data is
NULL.
R David Murray [Mon, 15 Jul 2013 16:09:47 +0000 (12:09 -0400)]
Closes #18464: fix typo in test name.
Victor Stinner [Mon, 15 Jul 2013 15:50:07 +0000 (17:50 +0200)]
Issue #18408: PyObject_Call() now fails with an assertion error in debug mode
if the function called failed whereas no exception was raised, to detect bugs
earlier.
Victor Stinner [Mon, 15 Jul 2013 15:47:39 +0000 (17:47 +0200)]
Issue #18408: Fix CJK decoders, raise MemoryError on memory allocation failure
Victor Stinner [Mon, 15 Jul 2013 15:15:57 +0000 (17:15 +0200)]
Issue #18408: Fix pyexpat.ParserCreate()
Check if XML_ParserCreate_MM() failed (ex: MemoryError) before using
self->itself.
Barry Warsaw [Mon, 15 Jul 2013 19:21:41 +0000 (15:21 -0400)]
- Issue #18440: Clarify that `hash()` can truncate the value returned from an
object's custom `__hash__()` method.
Ronald Oussoren [Mon, 15 Jul 2013 16:32:09 +0000 (18:32 +0200)]
Issue #18393: Remove use of deprecated API on OSX
The "Gestalt" function on OSX is deprecated (starting with OSX 10.8),
remove its usage from the stdlib. The patch removes a number of private
functions and a private module, but does not change the public API.
The removed code was effectively dead, the platform module has used
other code to fetch the OSX version for years and could only use
on the Gestalt-based code as a fallback. That fallback can only trigger
on broken OSX installs (that is, someone has removed parts of the system
install)
R David Murray [Mon, 15 Jul 2013 16:10:29 +0000 (12:10 -0400)]
Merge: Closes #18464: fix typo in test name.
Richard Oudkerk [Mon, 15 Jul 2013 15:10:28 +0000 (16:10 +0100)]
Issue #18344: Fix potential ref-leaks in _bufferedreader_read_all().
Richard Oudkerk [Mon, 15 Jul 2013 15:05:22 +0000 (16:05 +0100)]
Issue #18344: Fix potential ref-leaks in _bufferedreader_read_all().
Nick Coghlan [Mon, 15 Jul 2013 11:13:08 +0000 (21:13 +1000)]
Close issue 17482: don't overwrite __wrapped__
Serhiy Storchaka [Mon, 15 Jul 2013 09:37:43 +0000 (12:37 +0300)]
Issue #18449: Make Tools/demo/ss1.py work again on Python 3. Patch by
Févry Thibault.
Serhiy Storchaka [Mon, 15 Jul 2013 09:34:17 +0000 (12:34 +0300)]
Issue #18449: Make Tools/demo/ss1.py work again on Python 3. Patch by
Févry Thibault.
Ned Deily [Sun, 14 Jul 2013 19:45:18 +0000 (12:45 -0700)]
Closes #18452: fix several "occurrence" typos (reported by Févry Thibault).
Ned Deily [Sun, 14 Jul 2013 19:43:16 +0000 (12:43 -0700)]
Issue #18452: fix several "occurrence" typos (reported by Févry Thibault).
Brett Cannon [Sun, 14 Jul 2013 13:50:50 +0000 (09:50 -0400)]
Issue #9893: remove an outdated mention of the Vim-related files.
Raymond Hettinger [Sun, 14 Jul 2013 05:48:49 +0000 (22:48 -0700)]
merge
Raymond Hettinger [Sun, 14 Jul 2013 05:42:09 +0000 (22:42 -0700)]
Issue #18432: Fix unintended API change in the sched module
Raymond Hettinger [Sun, 14 Jul 2013 05:30:25 +0000 (22:30 -0700)]
Tweak the deque struct by moving the least used fields (maxlen and weakref) to the end.
Raymond Hettinger [Sun, 14 Jul 2013 00:03:58 +0000 (17:03 -0700)]
Use a do-while loop in the inner loop for rotate (m is always greater than zero).
Raymond Hettinger [Sat, 13 Jul 2013 09:34:08 +0000 (02:34 -0700)]
Move the freeblock() call outside the main loop to speed-up and simplify the block re-use logic.
Terry Jan Reedy [Sat, 13 Jul 2013 08:06:03 +0000 (04:06 -0400)]
Merge with 3.3
Terry Jan Reedy [Sat, 13 Jul 2013 08:05:42 +0000 (04:05 -0400)]
Issue #18365: convert buildbot errors to skips.
Terry Jan Reedy [Sat, 13 Jul 2013 06:35:07 +0000 (02:35 -0400)]
Merge with 3.3
Terry Jan Reedy [Sat, 13 Jul 2013 06:34:43 +0000 (02:34 -0400)]
Issue #18279: Add tests for idlelib/RstripExtension.py. Original patch by
Phil Webster. With that available, modify RstripExtension.py to stop deleting
null slices, which caused a file to be marked as changed when it was not.
R David Murray [Sat, 13 Jul 2013 02:56:15 +0000 (22:56 -0400)]
Merge: #18437: fix comment typo.
R David Murray [Sat, 13 Jul 2013 02:55:43 +0000 (22:55 -0400)]
#18437: fix comment typo.
Terry Jan Reedy [Sat, 13 Jul 2013 00:17:00 +0000 (20:17 -0400)]
Merge with 3.3
Terry Jan Reedy [Sat, 13 Jul 2013 00:16:28 +0000 (20:16 -0400)]
Issue #18365: normalize whitespace
Terry Jan Reedy [Sat, 13 Jul 2013 00:10:48 +0000 (20:10 -0400)]
Merge with 3.3
Terry Jan Reedy [Sat, 13 Jul 2013 00:10:23 +0000 (20:10 -0400)]
Issue #18365: Add mock Text class and test thereof versus tk.Text.
Based on patches by Todd.Rovito and Phil Webster.
R David Murray [Fri, 12 Jul 2013 21:43:53 +0000 (17:43 -0400)]
#18389: Clarify that relpath does not access the file system.
Initial patch by Madison May.
R David Murray [Fri, 12 Jul 2013 21:43:11 +0000 (17:43 -0400)]
#18389: Clarify that relpath does not access the file system.
Initial patch by Madison May.
Vinay Sajip [Fri, 12 Jul 2013 20:54:12 +0000 (21:54 +0100)]
Closes #18433: Merged documentation update from 3.3.
Vinay Sajip [Fri, 12 Jul 2013 20:52:51 +0000 (21:52 +0100)]
Issue #18433: Clarified venv documentation.