mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Patch 533291. Deprecate None return form of __reduce__.
This commit is contained in:
parent
7f7d5bf438
commit
97394bc795
2 changed files with 12 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue