summaryrefslogtreecommitdiff
path: root/Lib/typing.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-05-28 04:21:44 -0700
committerGitHub <noreply@github.com>2018-05-28 04:21:44 -0700
commit98b089e2a178a309f20ac9ff498b230407da1f47 (patch)
treeb7e0516467b4608e651c8e1a89deb86722d34708 /Lib/typing.py
parent96fb828da305b18336b8d74b14f479c4f286cf7b (diff)
downloadcpython-git-98b089e2a178a309f20ac9ff498b230407da1f47.tar.gz
bpo-33652: Remove __getstate__ and __setstate__ methods in typing. (GH-7144)
(cherry picked from commit 97b523db7c79c18c48516fba9410014d9896abc4) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/typing.py')
-rw-r--r--Lib/typing.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/Lib/typing.py b/Lib/typing.py
index e9265afce4..a95eb2e184 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -294,13 +294,6 @@ class _SpecialForm(_Final, _Immutable, _root=True):
__slots__ = ('_name', '_doc')
- def __getstate__(self):
- return {'name': self._name, 'doc': self._doc}
-
- def __setstate__(self, state):
- self._name = state['name']
- self._doc = state['doc']
-
def __new__(cls, *args, **kwds):
"""Constructor.
@@ -555,20 +548,6 @@ class TypeVar(_Final, _Immutable, _root=True):
if def_mod != 'typing':
self.__module__ = def_mod
- def __getstate__(self):
- return {'name': self.__name__,
- 'bound': self.__bound__,
- 'constraints': self.__constraints__,
- 'co': self.__covariant__,
- 'contra': self.__contravariant__}
-
- def __setstate__(self, state):
- self.__name__ = state['name']
- self.__bound__ = state['bound']
- self.__constraints__ = state['constraints']
- self.__covariant__ = state['co']
- self.__contravariant__ = state['contra']
-
def __repr__(self):
if self.__covariant__:
prefix = '+'