summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-05-28 10:54:56 (GMT)
committerIvan Levkivskyi <levkivskyi@gmail.com>2018-05-28 10:54:56 (GMT)
commit97b523db7c79c18c48516fba9410014d9896abc4 (patch)
tree8a74a22f59b84f88078dff46844fd28b347e5c2d
parentc651275afe8515b2cf70b8152e19ce39df88f0dd (diff)
downloadcpython-97b523db7c79c18c48516fba9410014d9896abc4.zip
cpython-97b523db7c79c18c48516fba9410014d9896abc4.tar.gz
cpython-97b523db7c79c18c48516fba9410014d9896abc4.tar.bz2
bpo-33652: Remove __getstate__ and __setstate__ methods in typing. (GH-7144)
-rw-r--r--Lib/typing.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/Lib/typing.py b/Lib/typing.py
index e9265af..a95eb2e 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 = '+'