summaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2009-06-09 23:08:13 +0000
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2009-06-09 23:08:13 +0000
commit0278ccbb30290bf29ec270a4a3f2691a31facd80 (patch)
treea4ad07909d9e583fcf1269c219a9876c069a1d4e /Doc
parentabe43b9f966f8150337f8157ac45eab230998b6a (diff)
downloadcpython-0278ccbb30290bf29ec270a4a3f2691a31facd80.tar.gz
#6201: Fix test_winreg on Windows:
since the introduction of the SETUP_WITH opcode, __enter__ and __exit__ methods must belong to the type, and are not retrieved at the instance level (__dict__ or __getattr__). Add a note in whatsnew about this incompatibility; old style classes are not affected.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/whatsnew/2.7.rst6
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/whatsnew/2.7.rst b/Doc/whatsnew/2.7.rst
index df7601fbcd..01dcc9f3cc 100644
--- a/Doc/whatsnew/2.7.rst
+++ b/Doc/whatsnew/2.7.rst
@@ -669,7 +669,11 @@ Porting to Python 2.7
This section lists previously described changes and other bugfixes
that may require changes to your code:
-To be written.
+* Because of an optimization for the :keyword:`with` statement, the special
+ methods :meth:`__enter__` and :meth:`__exit__` must belong to the object's
+ type, and cannot be directly attached to the object's instance. This
+ affects new-styles classes (derived from :class:`object`) or C extension
+ types. (:issue:`6101`.)
.. ======================================================================