[Python-checkins] python/dist/src/Lib pickle.py,1.159,1.160

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Tue Dec 7 08:06:27 CET 2004


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19035/Lib

Modified Files:
	pickle.py 
Log Message:
Eliminate the deprecated option to return None instead of a tuple of arguments in __reduce__().

Index: pickle.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pickle.py,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -d -r1.159 -r1.160
--- pickle.py	5 Dec 2004 05:20:42 -0000	1.159
+++ pickle.py	7 Dec 2004 07:05:52 -0000	1.160
@@ -33,7 +33,6 @@
 import sys
 import struct
 import re
-import warnings
 
 __all__ = ["PickleError", "PicklingError", "UnpicklingError", "Pickler",
            "Unpickler", "dump", "dumps", "load", "loads"]
@@ -349,14 +348,7 @@
 
         # Assert that args is a tuple or None
         if not isinstance(args, TupleType):
-            if args is None:
-                # A hack for Jim Fulton's ExtensionClass, now deprecated.
-                # See load_reduce()
-                warnings.warn("__basicnew__ special case is deprecated",
-                              DeprecationWarning)
-            else:
-                raise PicklingError(
-                    "args from reduce() should be a tuple")
+            raise PicklingError("args from reduce() should be a tuple")
 
         # Assert that func is callable
         if not callable(func):
@@ -1138,13 +1130,7 @@
         stack = self.stack
         args = stack.pop()
         func = stack[-1]
-        if args is None:
-            # A hack for Jim Fulton's ExtensionClass, now deprecated
-            warnings.warn("__basicnew__ special case is deprecated",
-                          DeprecationWarning)
-            value = func.__basicnew__()
-        else:
-            value = func(*args)
+        value = func(*args)
         stack[-1] = value
     dispatch[REDUCE] = load_reduce
 



More information about the Python-checkins mailing list