[pypy-commit] pypy default: Fix 2.6 compatibility
fijal
noreply at buildbot.pypy.org
Fri Feb 8 09:32:59 CET 2013
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r60958:9aafa03d6994
Date: 2013-02-08 10:32 +0200
http://bitbucket.org/pypy/pypy/changeset/9aafa03d6994/
Log: Fix 2.6 compatibility
diff --git a/rpython/annotator/description.py b/rpython/annotator/description.py
--- a/rpython/annotator/description.py
+++ b/rpython/annotator/description.py
@@ -497,8 +497,8 @@
# will do the right thing in s_get_value().
if isinstance(value, staticmethod) and mixin:
# make a new copy of staticmethod
- value = staticmethod(func_with_new_name(value.__func__,
- value.__func__.__name__))
+ func = value.__get__(42)
+ value = staticmethod(func_with_new_name(func, func.__name__))
if type(value) in MemberDescriptorTypes:
# skip __slots__, showing up in the class as 'member' objects
More information about the pypy-commit
mailing list