summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #20437: Fixed 22 potential bugs when deleting objects references.Serhiy Storchaka2014-02-091-6/+3
|\
| * Issue #20437: Fixed 21 potential bugs when deleting objects references.Serhiy Storchaka2014-02-091-6/+3
| |
* | Issue #14432: Remove the thread state field from the frame structure. Fix aVictor Stinner2013-12-131-37/+42
| | | | | | | | | | | | | | crash when a generator is created in a C thread that is destroyed while the generator is still used. The issue was that a generator contains a frame, and the frame kept a reference to the Python state of the destroyed C thread. The crash occurs when a trace function is setup.
* | Fix refleak introduced by 4f730c045f5f (issue #18408) and unveiled by ↵Antoine Pitrou2013-11-231-8/+4
| | | | | | | | 95eea8624d05 (issue #16596).
* | Better behavior when stepping over yield[from]. Fixes issue 16596. By Xavier ↵Guido van Rossum2013-11-211-0/+5
| | | | | | | | de Gaye.
* | Issue #19512: PRINT_EXPR bytecode now uses an identifier to get sys.displayhookVictor Stinner2013-11-061-1/+2
| | | | | | | | to only create the "displayhook" string once
* | merge 3.3Benjamin Peterson2013-10-301-3/+3
|\ \ | |/
| * update commentBenjamin Peterson2013-10-301-3/+3
| |
* | Issue #18408: Add a new PyFrame_FastToLocalsWithError() function to handleVictor Stinner2013-10-291-5/+14
| | | | | | | | | | exceptions when merging fast locals into f_locals of a frame. PyEval_GetLocals() now raises an exception and return NULL on failure.
* | Close #19199: Remove ``PyThreadState.tick_counter`` fieldVictor Stinner2013-10-091-1/+0
| |
* | Fix macro expansion of _PyErr_OCCURRED(), and make sure to use it in at ↵Antoine Pitrou2013-10-071-2/+2
|\ \ | |/ | | | | least one place so as to avoid regressions.
| * Fix macro expansion of _PyErr_OCCURRED(), and make sure to use it in at ↵Antoine Pitrou2013-10-071-2/+2
| | | | | | | | least one place so as to avoid regressions.
* | Issue #18722: Remove uses of the "register" keyword in C code.Antoine Pitrou2013-08-131-12/+12
| |
* | Issue #17934: Add a clear() method to frame objects, to help clean up ↵Antoine Pitrou2013-08-051-0/+2
| | | | | | | | expensive details (local variables) and break reference cycles.
* | Add missing check of PyDict_SetItem()'s return value in PyEval_EvalCodeEx()Christian Heimes2013-07-201-1/+3
|\ \ | |/ | | | | CID 486647
| * Add missing check of PyDict_SetItem()'s return value in PyEval_EvalCodeEx()Christian Heimes2013-07-201-1/+3
| | | | | | | | CID 486647
| * when arguments are cells clear the locals slot (backport of #17927)Benjamin Peterson2013-05-151-2/+6
| |
* | Issue #18408: PyEval_EvalFrameEx() and PyEval_CallObjectWithKeywords() now failVictor Stinner2013-07-171-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Issue #18408: add more assertions on PyErr_Occurred() in ceval.c to detect bugsVictor Stinner2013-07-151-0/+4
| | | | | | | | earlier
* | Issue #18408: Fix PyEval_EvalFrameEx() for MemoryErrorVictor Stinner2013-07-151-1/+4
| | | | | | | | | | Don't pass a NULL traceback to PyException_SetTraceback(): pass Py_None. Passing NULL would raise a new exception.
* | Issue #18342: Use the repr of a module name for ``from ... importBrett Cannon2013-07-121-1/+1
| | | | | | | | | | | | | | | | ...`` when an ImportError occurs. Other cases had already been switched over to using the repr. Thanks to Tomasz Maćkowiak for the patch.
* | 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: 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 #18408: Fix call_function() of ceval.c to handle PyTuple_New() failureVictor Stinner2013-07-081-4/+9
| | | | | | | | (in load_args()), ex: MemoryError.
* | Issue #15767: back out 8a0ed9f63c6e, finishing the removal ofBrett Cannon2013-07-041-1/+1
| | | | | | | | ModuleNotFoundError.
* | Issue #15767: Introduce ModuleNotFoundError, a subclass ofBrett Cannon2013-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ImportError. The exception is raised by import when a module could not be found. Technically this is defined as no viable loader could be found for the specified module. This includes ``from ... import`` statements so that the module usage is consistent for all situations where import couldn't find what was requested. This should allow for the common idiom of:: try: import something except ImportError: pass to be updated to using ModuleNotFoundError and not accidentally mask ImportError messages that should propagate (e.g. issues with a loader). This work was driven by the fact that the ``from ... import`` statement needed to be able to tell the difference between an ImportError that simply couldn't find a module (and thus silence the exception so that ceval can raise it) and an ImportError that represented an actual problem.
* | Fix a compilater warning on Windows 64-bitVictor Stinner2013-05-161-1/+1
| | | | | | | | idx variable is used for a tuple indexn so use Py_ssize_t (not int).
* | rather than passing locals to the class body, just execute the class body in ↵Benjamin Peterson2013-05-161-8/+0
| | | | | | | | the proper environment
* | when an argument is a cell, set the local copy to NULL (see #17927)Benjamin Peterson2013-05-121-8/+4
| |
* | #17927: Keep frame from referencing cell-ified arguments.Guido van Rossum2013-05-101-4/+12
| |
* | Issue #17094: Clear stale thread states after fork().Antoine Pitrou2013-05-051-8/+10
| | | | | | | | | | | | | | Note that this is a potentially disruptive change since it may release some system resources which would otherwise remain perpetually alive (e.g. database connections kept in thread-local storage).
* | check local class namespace before reaching for cells (closes #17853)Benjamin Peterson2013-04-301-0/+33
| |
* | Merge #17413: make sure settrace funcs get passed exception instances for ↵R David Murray2013-04-191-0/+1
|\ \ | |/ | | | | | | | | 'value'. Patch by Ingrid Cheung and Brendan McLoughlin.
| * #17413: make sure settrace funcs get passed exception instances for 'value'.R David Murray2013-04-191-0/+1
| | | | | | | | Patch by Ingrid Cheung and Brendan McLoughlin.
* | #17032: The "global" in the "NameError: global name 'x' is not defined" ↵Ezio Melotti2013-03-031-5/+3
| | | | | | | | error message has been removed. Patch by Ram Rachum.
* | evaluate positional defaults before keyword-only defaults (closes #16967)Benjamin Peterson2013-02-101-17/+17
| |
* | revert #16672 for incorrect semanticsBenjamin Peterson2013-01-231-4/+3
| |
* | improve tracing performance when f_trace is NULL (closes #16672)Benjamin Peterson2012-12-241-3/+4
| | | | | | | | Patch by Xavier de Gaye.
* | use error label instead of breaking eval loop (closes #16693)Benjamin Peterson2012-12-151-3/+2
| |
* | move more variable declarations to the top of blocksBenjamin Peterson2012-10-121-3/+4
| |
* | move declaration to top of blockBenjamin Peterson2012-10-121-1/+1
| |
* | ceval cleanupBenjamin Peterson2012-10-121-1012/+1088
| | | | | | | | | | | | | | | | | | - Make many variables local to the opcode; Kill u, v, w, and x. - Force every opcode to end with DISPATCH or jump to error handling. - Simplify error handling. - Check error statuses in more places. Closes #16191.
* | add some missing DISPATCH()Benjamin Peterson2012-10-101-9/+16
|/
* fix yield from return value on custom iterators (closes #15568)Benjamin Peterson2012-08-071-1/+1
|
* Issue #13783: the PEP 380 implementation no longer expands the public C APINick Coghlan2012-06-171-1/+1
|
* check return for errorBenjamin Peterson2012-06-011-0/+2
|
* PEP 415: Implement suppression of __context__ display with an exception ↵Benjamin Peterson2012-05-151-9/+12
| | | | | | attribute This replaces the original PEP 409 implementation. See #14133.
* only incref when using borrowing functionsBenjamin Peterson2012-04-261-1/+1
|
* Implement PEP 412: Key-sharing dictionaries (closes #13903)Benjamin Peterson2012-04-231-57/+18
| | | | Patch from Mark Shannon.
* Fix refleak: PyObject_GetItem returns a new reference, not a borrowed one ↵Antoine Pitrou2012-04-191-3/+3
| | | | like PyDict_GetItem.