mirror of
https://github.com/python/cpython.git
synced 2025-10-06 23:21:06 +00:00
bpo-46244: Remove __slots__ from typing.TypeVar, .ParamSpec (#30444)
* add missing __slots__ to typing._TypeVarLike * add news entry * remove slots from _TypeVarLike base classes * cleanup diff * fix broken link in blurb
This commit is contained in:
parent
6223cbf86a
commit
081a214008
2 changed files with 2 additions and 6 deletions
|
@ -805,9 +805,6 @@ class TypeVar( _Final, _Immutable, _TypeVarLike, _root=True):
|
|||
Note that only type variables defined in global scope can be pickled.
|
||||
"""
|
||||
|
||||
__slots__ = ('__name__', '__bound__', '__constraints__',
|
||||
'__covariant__', '__contravariant__', '__dict__')
|
||||
|
||||
def __init__(self, name, *constraints, bound=None,
|
||||
covariant=False, contravariant=False):
|
||||
self.__name__ = name
|
||||
|
@ -907,9 +904,6 @@ class ParamSpec(_Final, _Immutable, _TypeVarLike, _root=True):
|
|||
be pickled.
|
||||
"""
|
||||
|
||||
__slots__ = ('__name__', '__bound__', '__covariant__', '__contravariant__',
|
||||
'__dict__')
|
||||
|
||||
@property
|
||||
def args(self):
|
||||
return ParamSpecArgs(self)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue