summaryrefslogtreecommitdiffstats
path: root/Lib/copy_reg.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-02-01 02:16:37 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-02-01 02:16:37 (GMT)
commit1f1b2d2e68ef520c2c7a937a4f429020a4627356 (patch)
treee734d7746fc60baa64755a45689f64f0c186a7a3 /Lib/copy_reg.py
parent371935fc065e69c59c5382cbbf2cb098cf410f0e (diff)
downloadcpython-1f1b2d2e68ef520c2c7a937a4f429020a4627356.zip
cpython-1f1b2d2e68ef520c2c7a937a4f429020a4627356.tar.gz
cpython-1f1b2d2e68ef520c2c7a937a4f429020a4627356.tar.bz2
Removed all uses of the out-of-favor __safe_for_unpickling__ magic
attr, and copy_reg.safe_constructors.
Diffstat (limited to 'Lib/copy_reg.py')
-rw-r--r--Lib/copy_reg.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/Lib/copy_reg.py b/Lib/copy_reg.py
index cf801cb..2bff142 100644
--- a/Lib/copy_reg.py
+++ b/Lib/copy_reg.py
@@ -10,7 +10,6 @@ __all__ = ["pickle", "constructor",
"add_extension", "remove_extension", "clear_extension_cache"]
dispatch_table = {}
-safe_constructors = {}
def pickle(ob_type, pickle_function, constructor_ob=None):
if type(ob_type) is _ClassType:
@@ -26,7 +25,6 @@ def pickle(ob_type, pickle_function, constructor_ob=None):
def constructor(object):
if not callable(object):
raise TypeError("constructors must be callable")
- safe_constructors[object] = 1
# Example: provide pickling support for complex numbers.
@@ -41,7 +39,6 @@ def _reconstructor(cls, base, state):
obj = base.__new__(cls, state)
base.__init__(obj, state)
return obj
-_reconstructor.__safe_for_unpickling__ = 1
_HEAPTYPE = 1<<9