Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r89075:e8b1e5c2b023
Date: 2016-12-15 16:45 +0100
http://bitbucket.org/pypy/pypy/changeset/e8b1e5c2b023/
Log: Remove the functions' Stackless-style __reduce__ method: otherwise,
some tests fail because local functions are reduced using this
method (but not global functions). This is probably very confusing.
diff --git a/pypy/interpreter/function.py b/pypy/interpreter/function.py
--- a/pypy/interpreter/function.py
+++ b/pypy/interpreter/function.py
@@ -280,6 +280,7 @@
find = staticmethod(find)
def descr_function__reduce__(self, space):
+ XXX # This is not used any more
from pypy.interpreter.gateway import BuiltinCode
from pypy.interpreter.mixedmodule import MixedModule
w_mod = space.getbuiltinmodule('_pickle_support')
@@ -325,6 +326,7 @@
return nt([new_inst, nt(tup_base), nt(tup_state)])
def descr_function__setstate__(self, space, w_args):
+ XXX # This is not used any more
args_w = space.unpackiterable(w_args)
try:
(w_name, w_qualname, w_doc, w_code, w_func_globals, w_closure,
diff --git a/pypy/interpreter/test/test_zzpickle_and_slow.py
b/pypy/interpreter/test/test_zzpickle_and_slow.py
--- a/pypy/interpreter/test/test_zzpickle_and_slow.py
+++ b/pypy/interpreter/test/test_zzpickle_and_slow.py
@@ -136,6 +136,7 @@
def test_pickle_non_top_reachable_func(self):
self.skip_on_cpython()
+ skip("this behavior was disabled to follow CPython more closely")
def func():
return 42
global a
@@ -199,6 +200,7 @@
assert a == result
def test_pickle_method(self):
+ skip("this behavior was disabled to follow CPython more closely")
class myclass(object):
def f(self):
return 42
@@ -221,6 +223,7 @@
del sys.modules['mod']
def test_pickle_staticmethod(self):
+ skip("this behavior was disabled to follow CPython more closely")
self.skip_on_cpython()
class myclass(object):
def f():
@@ -233,6 +236,7 @@
assert method() == result()
def test_pickle_classmethod(self):
+ skip("this behavior was disabled to follow CPython more closely")
class myclass(object):
def f(cls):
return cls
diff --git a/pypy/interpreter/typedef.py b/pypy/interpreter/typedef.py
--- a/pypy/interpreter/typedef.py
+++ b/pypy/interpreter/typedef.py
@@ -672,8 +672,8 @@
descrmismatch='__call__'),
__get__ = interp2app(descr_function_get),
__repr__ = interp2app(Function.descr_function_repr,
descrmismatch='__repr__'),
- __reduce__ = interp2app(Function.descr_function__reduce__),
- __setstate__ = interp2app(Function.descr_function__setstate__),
+ #__reduce__ = interp2app(Function.descr_function__reduce__),
+ #__setstate__ = interp2app(Function.descr_function__setstate__),
__code__ = getset_func_code,
__doc__ = getset_func_doc,
__name__ = getset_func_name,
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit