[pypy-commit] pypy default: meant for py3.5 branch
exarkun
pypy.commits at gmail.com
Fri Aug 11 16:29:36 EDT 2017
Author: Jean-Paul Calderone <exarkun at twistedmatrix.com>
Branch:
Changeset: r92127:4578b8104495
Date: 2017-08-11 16:28 -0400
http://bitbucket.org/pypy/pypy/changeset/4578b8104495/
Log: meant for py3.5 branch
diff --git a/pypy/interpreter/function.py b/pypy/interpreter/function.py
--- a/pypy/interpreter/function.py
+++ b/pypy/interpreter/function.py
@@ -596,9 +596,8 @@
new_inst = mod.get('builtin_method_new')
tup = [w_instance, space.newtext(w_function.name)]
else:
- w_builtins = space.getbuiltinmodule('builtins')
- new_inst = space.getattr(w_builtins, space.newtext('getattr'))
- tup = [w_instance, space.newtext(self.w_function.name)]
+ new_inst = mod.get('method_new')
+ tup = [self.w_function, w_instance]
return space.newtuple([new_inst, space.newtuple(tup)])
diff --git a/pypy/interpreter/test/test_function.py b/pypy/interpreter/test/test_function.py
--- a/pypy/interpreter/test/test_function.py
+++ b/pypy/interpreter/test/test_function.py
@@ -49,15 +49,6 @@
assert f().__qualname__ == 'inner_global'
assert f()().__qualname__ == 'inner_global.<locals>.inner_function2'
- def test_classmethod_reduce(self):
- class X(object):
- @classmethod
- def y(cls):
- pass
-
- f, args = X.y.__reduce__()
- assert f(*args) == X.y
-
def test_annotations(self):
def f(): pass
ann = f.__annotations__
More information about the pypy-commit
mailing list