Issue #12149: Update the method cache after a type's dictionnary gets
authorAntoine Pitrou <solipsis@pitrou.net>
Tue, 12 Jul 2011 19:58:39 +0000 (21:58 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Tue, 12 Jul 2011 19:58:39 +0000 (21:58 +0200)
cleared by the garbage collector.  This fixes a segfault when an instance
and its type get caught in a reference cycle, and the instance's
deallocator calls one of the methods on the type (e.g. when subclassing
IOBase).

Diagnosis and patch by Davide Rizzo.

1  2 
Lib/test/test_io.py
Misc/ACKS
Misc/NEWS
Objects/typeobject.c

Simple merge
diff --cc Misc/ACKS
Simple merge
diff --cc Misc/NEWS
index c4c8430d4fb3796b8c4a459cb51ddc99cd6644cf,3df8e953870feb403120855ec3249e47ebc9cc02..8a848916c1e91b04579dd154d39d503a81c5bb20
+++ b/Misc/NEWS
@@@ -10,16 -10,14 +10,22 @@@ What's New in Python 3.3 Alpha 1
  Core and Builtins
  -----------------
  
+ - Issue #12149: Update the method cache after a type's dictionnary gets
+   cleared by the garbage collector.  This fixes a segfault when an instance
+   and its type get caught in a reference cycle, and the instance's
+   deallocator calls one of the methods on the type (e.g. when subclassing
+   IOBase).  Diagnosis and patch by Davide Rizzo.
  - Issue #9611, #9015: FileIO.read() clamps the length to INT_MAX on Windows.
  
 +- Issue #9642: Uniformize the tests on the availability of the mbcs codec, add
 +  a new HAVE_MBCS define.
 +
 +- Issue #9642: Fix filesystem encoding initialization: use the ANSI code page
 +  on Windows if the mbcs codec is not available, and fail with a fatal error if
 +  we cannot get the locale encoding (if nl_langinfo(CODESET) is not available)
 +  instead of using UTF-8.
 +
  - When a generator yields, do not retain the caller's exception state on the
    generator.
  
Simple merge