[pypy-commit] pypy py3.5: Re-enable our function pickling work-around

rlamy pypy.commits at gmail.com
Wed Oct 12 13:27:05 EDT 2016


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3.5
Changeset: r87733:db1530fc3406
Date: 2016-10-12 18:26 +0100
http://bitbucket.org/pypy/pypy/changeset/db1530fc3406/

Log:	Re-enable our function pickling work-around

diff --git a/lib-python/3/pickle.py b/lib-python/3/pickle.py
--- a/lib-python/3/pickle.py
+++ b/lib-python/3/pickle.py
@@ -1008,7 +1008,6 @@
             return self.save_reduce(type, (...,), obj=obj)
         return self.save_global(obj)
 
-    dispatch[FunctionType] = save_global
     dispatch[type] = save_type
 
 
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
@@ -244,9 +244,9 @@
         mod.myclass = myclass
         sys.modules['mod'] = mod
         try:
-            method   = myclass.f
-            pckl     = pickle.dumps(method)
-            result   = pickle.loads(pckl)
+            method = myclass.f
+            pckl = pickle.dumps(method)
+            result = pickle.loads(pckl)
             assert method() == result()
         finally:
             del sys.modules['mod']


More information about the pypy-commit mailing list