summaryrefslogtreecommitdiff
path: root/Python/ceval.c
AgeCommit message (Collapse)AuthorLines
2011-07-15catch nasty exception classes with __new__ that doesn't return a exception ↵Benjamin Peterson-0/+7
(closes #11627) Patch from Andreas Stührk.
2011-07-03never retain a generator's caller's exception state on the generator after a ↵Benjamin Peterson-4/+36
yield/return This requires some trickery to properly save the exception state if the generator creates its own exception state.
2011-07-03restore a generator's caller's exception state both on yield and (last) returnBenjamin Peterson-4/+5
This prevents generator exception state from leaking into the caller. Closes #12475.
2011-05-04Issue #1856: Avoid crashes and lockups when daemon threads run while theAntoine Pitrou-0/+6
interpreter is shutting down; instead, these threads are now killed when they try to take the GIL.
2011-03-16#11565: Merge with 3.1.Ezio Melotti-2/+2
2011-03-16#11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti-2/+2
2011-01-06Merged revisions 87796 via svnmerge fromDavid Malcolm-4/+5
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87796 | david.malcolm | 2011-01-06 12:01:36 -0500 (Thu, 06 Jan 2011) | 6 lines Issue #10655: Fix the build on PowerPC on Linux with GCC when building with timestamp profiling (--with-tsc): the preprocessor test for the PowerPC support now looks for "__powerpc__" as well as "__ppc__": the latter seems to only be present on OS X; the former is the correct one for Linux with GCC. ........
2011-01-06Issue #10655: Fix the build on PowerPC on Linux with GCC when building withDavid Malcolm-4/+5
timestamp profiling (--with-tsc): the preprocessor test for the PowerPC support now looks for "__powerpc__" as well as "__ppc__": the latter seems to only be present on OS X; the former is the correct one for Linux with GCC.
2010-12-03Merge branches/pep-0384.Martin v. Löwis-3/+4
2010-11-30Remove redundant includes of headers that are already included by Python.h.Georg Brandl-1/+0
2010-10-17make hashes always the size of pointers; introduce Py_hash_t #9778Benjamin Peterson-1/+1
2010-10-13ceval.c: catch recursion error on _PyUnicode_AsString(co->co_filename)Victor Stinner-0/+4
2010-09-25revert r85003, poorly considered; breaks testsBenjamin Peterson-1/+1
2010-09-25don't count keyword arguments as positional #9943Benjamin Peterson-1/+1
2010-09-13Issue #9828: Destroy the GIL in Py_Finalize(), so that it gets properlyAntoine Pitrou-4/+9
re-created on a subsequent call to Py_Initialize(). The problem (a crash) wouldn't appear in 3.1 or 2.7 where the GIL's structure is more trivial.
2010-09-10typoBenjamin Peterson-2/+2
2010-09-10use Py_REFCNTBenjamin Peterson-2/+2
2010-09-10remove gil_drop_request in --without-threadsBenjamin Peterson-4/+13
2010-09-10use DISPATCH() instead of continueBenjamin Peterson-1/+1
2010-09-10#4617: Previously it was illegal to delete a name from the localAmaury Forgeot d'Arc-16/+34
namespace if it occurs as a free variable in a nested block. This limitation of the compiler has been lifted, and a new opcode introduced (DELETE_DEREF). This sample was valid in 2.6, but fails to compile in 3.x without this change:: >>> def f(): ... def print_error(): ... print(e) ... try: ... something ... except Exception as e: ... print_error() ... # implicit "del e" here This sample has always been invalid in Python, and now works:: >>> def outer(x): ... def inner(): ... return x ... inner() ... del x There is no need to bump the PYC magic number: the new opcode is used for code that did not compile before.
2010-09-04Issue #9225: Remove the ROT_FOUR and DUP_TOPX opcode, the latter replacedAntoine Pitrou-38/+9
by the new (and simpler) DUP_TOP_TWO. Performance isn't changed, but our bytecode is a bit simplified. Patch by Demur Rumed.
2010-08-17Issue #9425: save/restore exception on filename encodingVictor Stinner-1/+6
_PyUnicode_AsString() raises an exception on unencodable filename.
2010-08-13Issue #9203: Computed gotos are now enabled by default on supportedAntoine Pitrou-4/+17
compilers (which are detected by the configure script). They can still be disable selectively by specifying --without-computed-gotos.
2010-07-20revert unintended changesBenjamin Peterson-8/+8
2010-07-20move test_trace.py so as not to conflict with future tests for the trace moduleBenjamin Peterson-8/+8
2010-07-10#3071: tell how many values were expected when unpacking too many.Georg Brandl-1/+2
2010-06-25only take into account positional arguments count in related error messagesBenjamin Peterson-3/+3
2010-06-23Merged revisions 82181 via svnmerge fromStefan Krah-40/+40
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82181 | stefan.krah | 2010-06-23 20:42:39 +0200 (Wed, 23 Jun 2010) | 3 lines Issue #8930: Remaining indentation fixes after the Grand Unified Indenting. ........
2010-06-23Issue #8930: Remaining indentation fixes after the Grand Unified Indenting.Stefan Krah-42/+42
2010-05-30use atomic structures in non-thread versionBenjamin Peterson-1/+1
2010-05-09Recorded merge of revisions 81032 via svnmerge fromAntoine Pitrou-3294/+3294
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines Recorded merge of revisions 81029 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........ ................
2010-05-09Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou-3367/+3367
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
2010-05-03read eval_breaker with atomic api with computed gotosBenjamin Peterson-1/+1
2010-05-03Make (most of) Python's tests pass under Thread Sanitizer.Jeffrey Yasskin-19/+44
http://code.google.com/p/data-race-test/wiki/ThreadSanitizer is a dynamic data race detector that runs on top of valgrind. With this patch, the binaries at http://code.google.com/p/data-race-test/wiki/ThreadSanitizer#Binaries pass many but not all of the Python tests. All of regrtest still passes outside of tsan. I've implemented part of the C1x atomic types so that we can explicitly mark variables that are used across threads, and get defined behavior as compilers advance. I've added tsan's client header and implementation to the codebase in dynamic_annotations.{h,c} (docs at http://code.google.com/p/data-race-test/wiki/DynamicAnnotations). Unfortunately, I haven't been able to get helgrind and drd to give sensible error messages, even when I use their client annotations, so I'm not supporting them.
2010-04-01Merged revisions 79555 via svnmerge fromAntoine Pitrou-12/+1
svn+ssh://pythondev@svn.python.org/python/trunk ........ r79555 | antoine.pitrou | 2010-04-01 18:42:11 +0200 (jeu., 01 avril 2010) | 5 lines Issue #8276: PyEval_CallObject() is now only available in macro form. The function declaration, which was kept for backwards compatibility reasons, is now removed (the macro was introduced in 1997!). ........
2010-03-21nest if for clarityBenjamin Peterson-8/+8
2010-03-21count keyword only arguments as part of the totalBenjamin Peterson-2/+2
2010-03-21Merged revisions 78028 via svnmerge fromBenjamin Peterson-3/+0
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78028 | benjamin.peterson | 2010-02-06 13:40:18 -0600 (Sat, 06 Feb 2010) | 1 line remove pointless error checking ........
2010-03-21cleanup a bitBenjamin Peterson-24/+15
2010-03-21Merged revisions 78875 via svnmerge fromVictor Stinner-2/+2
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r78875 | victor.stinner | 2010-03-12 18:00:41 +0100 (ven., 12 mars 2010) | 5 lines Issue #6697: use %U format instead of _PyUnicode_AsString(), because _PyUnicode_AsString() was not checked for error (NULL). The unicode string is no more truncated to 200 or 400 *bytes*. ........
2010-03-21Merged revisions 79205,79219,79228,79230,79232-79233,79235,79237 via ↵Benjamin Peterson-18/+18
svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r79205 | benjamin.peterson | 2010-03-21 12:34:54 -0500 (Sun, 21 Mar 2010) | 1 line rewrite a bit ........ r79219 | benjamin.peterson | 2010-03-21 14:24:08 -0500 (Sun, 21 Mar 2010) | 1 line flatten condition ........ r79228 | benjamin.peterson | 2010-03-21 14:35:39 -0500 (Sun, 21 Mar 2010) | 1 line remove pointless condition ........ r79230 | benjamin.peterson | 2010-03-21 14:39:52 -0500 (Sun, 21 Mar 2010) | 1 line co_varnames is certainly a tuple, so let's not waste time finding out ........ r79232 | benjamin.peterson | 2010-03-21 14:54:56 -0500 (Sun, 21 Mar 2010) | 1 line fix import ........ r79233 | benjamin.peterson | 2010-03-21 14:56:37 -0500 (Sun, 21 Mar 2010) | 1 line don't write duplicate tests ........ r79235 | benjamin.peterson | 2010-03-21 15:21:00 -0500 (Sun, 21 Mar 2010) | 4 lines improve error message from passing inadequate number of keyword arguments #6474 Note this removes the "non-keyword" or "keyword" phrases from these messages. ........ r79237 | benjamin.peterson | 2010-03-21 15:30:30 -0500 (Sun, 21 Mar 2010) | 1 line take into account keyword arguments when passing too many args ........
2010-03-12Issue #6697: use %U format instead of _PyUnicode_AsString(), becauseVictor Stinner-2/+2
_PyUnicode_AsString() was not checked for error (NULL). The unicode string is no more truncated to 200 or 400 *bytes*.
2010-03-07Merged revisions 78766 via svnmerge fromBenjamin Peterson-1/+1
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r78766 | benjamin.peterson | 2010-03-07 11:10:51 -0600 (Sun, 07 Mar 2010) | 1 line prevent generator finalization from invalidating sys.exc_info() #7173 ........
2010-03-07prevent generator finalization from invalidating sys.exc_info() #7173Benjamin Peterson-1/+1
2010-02-11fix commentBenjamin Peterson-1/+1
2009-11-10Merge in the new GIL.Antoine Pitrou-61/+101
2009-10-31Merged revisions 75984 via svnmerge fromMark Dickinson-1/+19
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r75984 | mark.dickinson | 2009-10-31 10:18:44 +0000 (Sat, 31 Oct 2009) | 12 lines Merged revisions 75982 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75982 | mark.dickinson | 2009-10-31 10:11:28 +0000 (Sat, 31 Oct 2009) | 5 lines Issue #6603: Fix --with-tsc build failures on x86-64 that resulted from a gcc inline assembler peculiarity. (gcc's "A" constraint apparently means 'rax or rdx' in 64-bit mode, not edx:eax or rdx:rax as one might expect.) ........ ................
2009-10-31Merged revisions 75982 via svnmerge fromMark Dickinson-1/+19
svn+ssh://pythondev@svn.python.org/python/trunk ........ r75982 | mark.dickinson | 2009-10-31 10:11:28 +0000 (Sat, 31 Oct 2009) | 5 lines Issue #6603: Fix --with-tsc build failures on x86-64 that resulted from a gcc inline assembler peculiarity. (gcc's "A" constraint apparently means 'rax or rdx' in 64-bit mode, not edx:eax or rdx:rax as one might expect.) ........
2009-10-03silence with (void) two warnings about computed and unused value of POP()Ezio Melotti-2/+2
2009-07-21Merged revisions 73750 via svnmerge fromAlexandre Vassalotti-5/+4
svn+ssh://pythondev@svn.python.org/python/trunk ........ r73750 | benjamin.peterson | 2009-07-01 19:45:19 -0400 (Wed, 01 Jul 2009) | 1 line small optimization: avoid popping the current block until we have to ........