[issue44098] Remove ParamSpec from __parameters__ of most typing generics

2021-07-31 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

See issue44796.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44098] Remove ParamSpec from __parameters__ of most typing generics

2021-07-28 Thread Ken Jin


Ken Jin  added the comment:

@Serhiy, could you please briefly describe what you are planning? I'm guessing 
you're generalizing for _TypeVarLike?

My main concern is that we should have as few differences between builtin and 
typing types as possible. typing.List is deprecated and set to remove in Python 
3.13/14, so I'm hoping the transition will be fairly painless.

Originally, the builtin types supported ParamSpec, but I removed that in 
GH-25449 for various reasons listed in that PR.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44098] Remove ParamSpec from __parameters__ of most typing generics

2021-07-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I am writing a patch which generalizes and significantly simplifies the code 
for type variables and parameter specifications substitution, and opens a way 
for more runtime validation. But it is incompatible with these changes.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44098] Remove ParamSpec from __parameters__ of most typing generics

2021-07-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

Yeah, but we shouldn't go out of our way to reject it. Especially since in 3.11 
we'll likely have something equivalent to PEP 563 or PEP 649 (the SC is 
thinking deep about this right now) and either of those means that usually it 
won't be evaluated at all anyway (you'd have to call get_type_hints() with PEP 
563, or use __annotations__ with the other).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44098] Remove ParamSpec from __parameters__ of most typing generics

2021-07-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I think that List[P] should be illegal at first place.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44098] Remove ParamSpec from __parameters__ of most typing generics

2021-05-14 Thread Ken Jin


Ken Jin  added the comment:

All patches have landed. Thanks Guido!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44098] Remove ParamSpec from __parameters__ of most typing generics

2021-05-13 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset c55ff1b352f8b82184f80d9dea220e832691acfc by Miss Islington (bot) 
in branch '3.10':
bpo-44098: Drop ParamSpec from most ``__parameters__`` in typing generics 
(GH-26013) (#26091)
https://github.com/python/cpython/commit/c55ff1b352f8b82184f80d9dea220e832691acfc


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44098] Remove ParamSpec from __parameters__ of most typing generics

2021-05-12 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +24731
pull_request: https://github.com/python/cpython/pull/26091

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44098] Remove ParamSpec from __parameters__ of most typing generics

2021-05-10 Thread Ken Jin


Change by Ken Jin :


--
keywords: +patch
pull_requests: +24664
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26013

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44098] Remove ParamSpec from __parameters__ of most typing generics

2021-05-10 Thread Ken Jin


New submission from Ken Jin :

``typing.List`` includes ``ParamSpec`` in ``__parameters__`` but the builtin 
``list`` doesn't. The behavior of the latter is correct, as PEP 612 states 
that: "As before, parameters_expressions by themselves are not acceptable in 
places where a type is expected".

https://www.python.org/dev/peps/pep-0612/#valid-use-locations

This patch just makes the typing version same as the builtin version by 
excluding ``ParamSpec`` from ``__parameters__`` (except for Concatenate, 
Callable, and Generic).

--
assignee: kj
components: Library (Lib)
messages: 393373
nosy: gvanrossum, kj, levkivskyi
priority: normal
severity: normal
status: open
title: Remove ParamSpec from __parameters__ of most typing generics
versions: Python 3.10, Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com