summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2002-05-21 17:22:02 (GMT)
committerRaymond Hettinger <python@rcn.com>2002-05-21 17:22:02 (GMT)
commit97394bc7950d898843f7136c5af69279ea9bb080 (patch)
tree8bb445830d06581fedd5928f2aa6636c45bcbca7 /Lib
parent7f7d5bf43873b13c21cff8ab452df3ebde3a39ce (diff)
downloadcpython-97394bc7950d898843f7136c5af69279ea9bb080.zip
cpython-97394bc7950d898843f7136c5af69279ea9bb080.tar.gz
cpython-97394bc7950d898843f7136c5af69279ea9bb080.tar.bz2
Patch 533291. Deprecate None return form of __reduce__.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/pickle.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py
index 5837884..d24786a 100644
--- a/Lib/pickle.py
+++ b/Lib/pickle.py
@@ -862,6 +862,10 @@ class Unpickler:
"unpickling" % callable
if arg_tup is None:
+ import warnings
+ warnings.warn("The None return argument form of __reduce__ is "
+ "deprecated. Return a tuple of arguments instead.",
+ DeprecationWarning)
value = callable.__basicnew__()
else:
value = apply(callable, arg_tup)