@@ -775,8 +775,7 @@ def Concatenate(self, parameters):
775
775
"ParamSpec variable or ellipsis." )
776
776
msg = "Concatenate[arg, ...]: each arg must be a type."
777
777
parameters = (* (_type_check (p , msg ) for p in parameters [:- 1 ]), parameters [- 1 ])
778
- return _ConcatenateGenericAlias (self , parameters ,
779
- _paramspec_tvars = True )
778
+ return _ConcatenateGenericAlias (self , parameters )
780
779
781
780
782
781
@_SpecialForm
@@ -1307,8 +1306,7 @@ def __getattr__(self, attr):
1307
1306
raise AttributeError (attr )
1308
1307
1309
1308
def __setattr__ (self , attr , val ):
1310
- if _is_dunder (attr ) or attr in {'_name' , '_inst' , '_nparams' ,
1311
- '_paramspec_tvars' }:
1309
+ if _is_dunder (attr ) or attr in {'_name' , '_inst' , '_nparams' }:
1312
1310
super ().__setattr__ (attr , val )
1313
1311
else :
1314
1312
setattr (self .__origin__ , attr , val )
@@ -1362,15 +1360,13 @@ class _GenericAlias(_BaseGenericAlias, _root=True):
1362
1360
# ClassVar[float]
1363
1361
# TypeVar[bool]
1364
1362
1365
- def __init__ (self , origin , args , * , inst = True , name = None ,
1366
- _paramspec_tvars = False ):
1363
+ def __init__ (self , origin , args , * , inst = True , name = None ):
1367
1364
super ().__init__ (origin , inst = inst , name = name )
1368
1365
if not isinstance (args , tuple ):
1369
1366
args = (args ,)
1370
1367
self .__args__ = tuple (... if a is _TypingEllipsis else
1371
1368
a for a in args )
1372
1369
self .__parameters__ = _collect_parameters (args )
1373
- self ._paramspec_tvars = _paramspec_tvars
1374
1370
if not name :
1375
1371
self .__module__ = origin .__module__
1376
1372
@@ -1513,8 +1509,7 @@ def _make_substitution(self, args, new_arg_by_param):
1513
1509
return new_args
1514
1510
1515
1511
def copy_with (self , args ):
1516
- return self .__class__ (self .__origin__ , args , name = self ._name , inst = self ._inst ,
1517
- _paramspec_tvars = self ._paramspec_tvars )
1512
+ return self .__class__ (self .__origin__ , args , name = self ._name , inst = self ._inst )
1518
1513
1519
1514
def __repr__ (self ):
1520
1515
if self ._name :
@@ -1624,8 +1619,7 @@ def __reduce__(self):
1624
1619
class _CallableType (_SpecialGenericAlias , _root = True ):
1625
1620
def copy_with (self , params ):
1626
1621
return _CallableGenericAlias (self .__origin__ , params ,
1627
- name = self ._name , inst = self ._inst ,
1628
- _paramspec_tvars = True )
1622
+ name = self ._name , inst = self ._inst )
1629
1623
1630
1624
def __getitem__ (self , params ):
1631
1625
if not isinstance (params , tuple ) or len (params ) != 2 :
@@ -1869,8 +1863,7 @@ def __class_getitem__(cls, params):
1869
1863
new_args .append (new_arg )
1870
1864
params = tuple (new_args )
1871
1865
1872
- return _GenericAlias (cls , params ,
1873
- _paramspec_tvars = True )
1866
+ return _GenericAlias (cls , params )
1874
1867
1875
1868
def __init_subclass__ (cls , * args , ** kwargs ):
1876
1869
super ().__init_subclass__ (* args , ** kwargs )
0 commit comments