cpython/Python
Amaury Forgeot d'Arc 0d75f09177 Merge from py3k branch:
Correction for issue1265 (pdb bug with "with" statement).

When an unfinished generator-iterator is garbage collected, PyEval_EvalFrameEx
is called with a GeneratorExit exception set.  This leads to funny results
if the sys.settrace function itself makes use of generators.
A visible effect is that the settrace function is reset to None.
Another is that the eventual "finally" block of the generator is not called.

It is necessary to save/restore the exception around the call to the trace
function.

This happens a lot with py3k: isinstance() of an ABCMeta instance runs
    def __instancecheck__(cls, instance):
        """Override for isinstance(instance, cls)."""
        return any(cls.__subclasscheck__(c)
                   for c in {instance.__class__, type(instance)})
which lets an opened generator expression each time it returns True.

Backport candidate, even if the case is less frequent in 2.5.
2007-11-13 21:54:28 +00:00
..
Python-ast.c Fix a couple of problems in generating the AST code: 2007-02-26 18:10:47 +00:00
asdl.c Fix type errors. 2006-04-13 13:08:58 +00:00
ast.c Fix Coverity #158: Check the correct variable. 2007-10-05 03:41:19 +00:00
atof.c Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774. 2001-07-26 13:41:06 +00:00
bltinmodule.c Missing DECREFs 2007-10-25 02:26:58 +00:00
ceval.c Merge from py3k branch: 2007-11-13 21:54:28 +00:00
codecs.c Bug #1511381: codec_getstreamcodec() in codec.c is corrected to 2006-06-23 21:16:18 +00:00
compile.c Fix #1169: remove docstrings in functions for -OO. 2007-09-19 06:37:19 +00:00
dup2.c Mass ANSIfication of function definitions. Doesn't cover all 'extern' 2000-07-22 18:47:25 +00:00
dynload_aix.c Fix SF bug #1072182, problems with signed characters. 2005-12-19 06:05:18 +00:00
dynload_atheos.c Patch #488073: AtheOS port. 2002-06-11 06:22:31 +00:00
dynload_beos.c Fix for 2002-01-23 15:51:12 +00:00
dynload_dl.c Use PyOS_snprintf instead of sprintf. 2001-11-28 20:42:20 +00:00
dynload_hpux.c Oops, I forgot to include this file in the last commit (46046): 2006-05-19 07:05:01 +00:00
dynload_next.c Fix for 838140: don't call NSUnlinkModule when we fail to find our 2004-07-15 22:28:48 +00:00
dynload_os2.c Use PyOS_snprintf instead of sprintf. 2001-11-28 20:42:20 +00:00
dynload_shlib.c Fix a warning from gcc by adding a missed const qualifier. 2006-01-04 01:30:17 +00:00
dynload_stub.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
dynload_win.c Include <windows.h> after python.h, so that WINNT is properly set before windows.h is included. Fixes warnings in PC builds. 2007-05-26 19:31:39 +00:00
errors.c Fix a crasher where Python code managed to infinitely recurse in C code without 2007-09-07 04:18:30 +00:00
frozen.c This is my patch 2002-08-15 14:59:02 +00:00
frozenmain.c Patch #569753: Remove support for WIN16. 2002-06-30 15:26:10 +00:00
future.c Handle more mem alloc issues found with failmalloc 2006-07-23 07:50:36 +00:00
getargs.c Forward-port of r52136,52138: a review of overflow-detecting code. 2006-10-04 12:17:45 +00:00
getcompiler.c The GCC version is loooooooooong; put it on a new line. 2000-09-05 04:40:39 +00:00
getcopyright.c update to (c) years to include 2007 2007-01-06 04:45:54 +00:00
getcwd.c Define MAXPATHLEN to be at least PATH_MAX, if that's defined. Python uses 2006-04-25 15:29:46 +00:00
getmtime.c spread the extern "C" { } magic pixie dust around. Python itself builds now 2006-04-13 02:06:09 +00:00
getopt.c Accept long options "--help" and "--version". 2006-07-12 15:31:17 +00:00
getplatform.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
getversion.c Use PyOS_snprintf instead of sprintf. 2001-11-28 20:42:20 +00:00
graminit.c Backport PEP 3110's new 'except' syntax to 2.6. 2007-05-18 23:11:24 +00:00
hypot.c Patch #1418: Make the AC_REPLACE_FUNCS object files actually work. 2007-11-12 05:14:05 +00:00
import.c Backport of Guido's review of my patch. 2007-11-07 18:30:22 +00:00
importdl.c Patch #794826: Add __file__ in dynamically loaded modules for multiple 2003-09-04 18:45:59 +00:00
importdl.h PEP 302 + zipimport: 2002-12-30 22:08:05 +00:00
mactoolboxglue.c Add missing Py_DECREFs. 2006-07-11 16:44:25 +00:00
marshal.c Fix marshal's incorrect handling of subclasses of builtin types (backport candidate). 2007-11-07 01:13:09 +00:00
memmove.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
modsupport.c Forward-port of r52136,52138: a review of overflow-detecting code. 2006-10-04 12:17:45 +00:00
mysnprintf.c PyOS_vsnprintf(): Change PyMem_Malloc() call to PyMem_MALLOC() macro, 2001-12-21 16:32:15 +00:00
mystrtoul.c Forward-port of r52136,52138: a review of overflow-detecting code. 2006-10-04 12:17:45 +00:00
peephole.c Use macro version of GET_SIZE to avoid Coverity warning (#150) about a possible error. 2007-06-09 04:48:22 +00:00
pyarena.c Fix more memory allocation issues found with failmalloc. 2006-07-22 16:20:49 +00:00
pyfpe.c Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774. 2001-07-26 13:41:06 +00:00
pystate.c Bug #742342: make Python stop segfaulting on infinitely-recursive reload()s. Fixed by patch #922167. 2007-03-12 16:11:39 +00:00
pystrtod.c Bug #1417699: Reject locale-specific decimal point in float() 2006-07-03 12:19:50 +00:00
pythonrun.c Make pythoncore compile cleanly with VisualStudio 2005. Used an explicit typecast to get a 64 bit integer, and undefined the Yield macro that conflicts with winbase.h 2007-04-25 00:17:39 +00:00
sigcheck.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
strdup.c Mass ANSIfication of function definitions. Doesn't cover all 'extern' 2000-07-22 18:47:25 +00:00
strerror.c Getting rid of all the code inside #ifdef macintosh too. 2003-11-20 01:44:59 +00:00
strtod.c Patch #1495999: Part two of Windows CE changes. 2006-06-10 12:23:46 +00:00
structmember.c Handle errors when generating a warning. 2007-08-05 03:23:31 +00:00
symtable.c PEP 3123: Provide forward compatibility with Python 3.0, while keeping 2007-07-21 06:55:02 +00:00
sysmodule.c SF #1701207, Fix bogus assertion (and test it!) 2007-04-16 07:37:55 +00:00
thread.c Handle more memory allocation failures without crashing. 2006-07-21 07:59:47 +00:00
thread_atheos.h Patch #488073: AtheOS port. 2002-06-11 06:22:31 +00:00
thread_beos.h Remove the unused & broken PyThread_*_sema() functions and related constants. 2002-01-19 22:02:55 +00:00
thread_cthread.h Remove the unused & broken PyThread_*_sema() functions and related constants. 2002-01-19 22:02:55 +00:00
thread_foobar.h Remove the unused & broken PyThread_*_sema() functions and related constants. 2002-01-19 22:02:55 +00:00
thread_lwp.h Remove the unused & broken PyThread_*_sema() functions and related constants. 2002-01-19 22:02:55 +00:00
thread_nt.h Fix problems in x64 build that were discovered by the testsuite: 2007-05-03 20:27:03 +00:00
thread_os2.h bugfix: PyThread_start_new_thread() returns the thread ID, not a flag; 2006-07-23 13:00:04 +00:00
thread_pth.h Patch #805613: Fix usage of the PTH library. 2003-09-20 11:13:36 +00:00
thread_pthread.h Patch #1454481: Make thread stack size runtime tunable. 2006-06-13 15:04:24 +00:00
thread_sgi.h Remove support for DYNIX, IRIX 4, --with-sgi-dl, --with-dl-dld 2004-01-17 04:04:13 +00:00
thread_solaris.h Patch #716969: Detect thread creation failure. Will backport to 2.2. 2003-04-19 07:44:52 +00:00
thread_wince.h bug 1234979 addition 2005-07-09 15:26:33 +00:00
traceback.c PEP 3123: Provide forward compatibility with Python 3.0, while keeping 2007-07-21 06:55:02 +00:00