[pypy-commit] pypy multiphase: hg merge py3.5

rlamy pypy.commits at gmail.com
Sat Aug 12 14:39:37 EDT 2017


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: multiphase
Changeset: r92137:154db7d0b56e
Date: 2017-08-12 20:37 +0200
http://bitbucket.org/pypy/pypy/changeset/154db7d0b56e/

Log:	hg merge py3.5

diff --git a/pypy/config/pypyoption.py b/pypy/config/pypyoption.py
--- a/pypy/config/pypyoption.py
+++ b/pypy/config/pypyoption.py
@@ -73,6 +73,8 @@
 
     if "_cppyy" in working_modules:
         working_modules.remove("_cppyy")  # not tested on win32
+    if "_vmprof" in working_modules:
+        working_modules.remove("_vmprof")  # FIXME: missing details
 
     # The _locale module is needed by site.py on Windows
     default_modules.add("_locale")
diff --git a/pypy/interpreter/function.py b/pypy/interpreter/function.py
--- a/pypy/interpreter/function.py
+++ b/pypy/interpreter/function.py
@@ -596,8 +596,9 @@
             new_inst = mod.get('builtin_method_new')
             tup = [w_instance, space.newtext(w_function.name)]
         else:
-            new_inst = mod.get('method_new')
-            tup = [self.w_function, w_instance]
+            w_builtins = space.getbuiltinmodule('builtins')
+            new_inst = space.getattr(w_builtins, space.newtext('getattr'))
+            tup = [w_instance, space.newtext(self.w_function.name)]
         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,6 +49,19 @@
         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
+        # This is perhaps overly specific.  It's an attempt to be certain that
+        # pickle will actually work with this implementation.
+        assert f == getattr
+        assert args == (X, "y")
+
     def test_annotations(self):
         def f(): pass
         ann = f.__annotations__
diff --git a/rpython/translator/c/src/signals.c b/rpython/translator/c/src/signals.c
--- a/rpython/translator/c/src/signals.c
+++ b/rpython/translator/c/src/signals.c
@@ -74,6 +74,7 @@
 }
 
 #ifdef _WIN32
+#include <Windows.h>
 #define atomic_cas(ptr, oldv, newv)   (InterlockedCompareExchange(ptr, \
                                             newv, oldv) == (oldv))
 #else


More information about the pypy-commit mailing list