diff options
| author | Tim Peters <tim.peters@gmail.com> | 2003-02-01 02:16:37 +0000 |
|---|---|---|
| committer | Tim Peters <tim.peters@gmail.com> | 2003-02-01 02:16:37 +0000 |
| commit | 1f1b2d2e68ef520c2c7a937a4f429020a4627356 (patch) | |
| tree | e734d7746fc60baa64755a45689f64f0c186a7a3 /Lib | |
| parent | 371935fc065e69c59c5382cbbf2cb098cf410f0e (diff) | |
| download | cpython-git-1f1b2d2e68ef520c2c7a937a4f429020a4627356.tar.gz | |
Removed all uses of the out-of-favor __safe_for_unpickling__ magic
attr, and copy_reg.safe_constructors.
Diffstat (limited to 'Lib')
| -rw-r--r-- | Lib/copy_reg.py | 3 | ||||
| -rw-r--r-- | Lib/test/pickletester.py | 2 |
2 files changed, 0 insertions, 5 deletions
diff --git a/Lib/copy_reg.py b/Lib/copy_reg.py index cf801cb584..2bff142b57 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 diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index ed0e436be3..8211dcf58c 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -15,8 +15,6 @@ class myint(int): class initarg(C): - __safe_for_unpickling__ = 1 - def __init__(self, a, b): self.a = a self.b = b |
