Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r52736:46769341e0eb
Date: 2012-02-21 16:06 +0100
http://bitbucket.org/pypy/pypy/changeset/46769341e0eb/
Log: don't pop() the __doc__ attribute out of rawdict, else the
corresponding GetSetProperty won't be seen by self.add_entries, and
its name won't be set.
This ultimately causes test_proxy_function.test_funct_propset_del to
fail, because transparent proxies expect properties to have the
right name. Until today it worked "by chance", because
Function.typedef had the same property under two names ('func_doc'
and '__doc__'), thus it got a name anyway even if '__doc__' was
popped.
diff --git a/pypy/interpreter/typedef.py b/pypy/interpreter/typedef.py
--- a/pypy/interpreter/typedef.py
+++ b/pypy/interpreter/typedef.py
@@ -24,7 +24,7 @@
self.bases = bases
self.hasdict = '__dict__' in rawdict
self.weakrefable = '__weakref__' in rawdict
- self.doc = rawdict.pop('__doc__', None)
+ self.doc = rawdict.get('__doc__', None)
for base in bases:
self.hasdict |= base.hasdict
self.weakrefable |= base.weakrefable
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit