[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-03-02 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 59e1ce95f1e6ea8a556212b8b10cbc122f1a1711 by Jelle Zijlstra in branch 'main': bpo-46643: fix NEWS entry (GH-31651) https://github.com/python/cpython/commit/59e1ce95f1e6ea8a556212b8b10cbc122f1a1711 -- ___

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-03-02 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- pull_requests: +29770 pull_request: https://github.com/python/cpython/pull/31651 ___ Python tracker ___ __

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-03-02 Thread miss-islington
miss-islington added the comment: New changeset 257f5be7f7fad37d0db6c145e534e5b7289d8804 by Miss Islington (bot) in branch '3.10': bpo-46643: Fix stringized P.args/P.kwargs with get_type_hints (GH-31238) https://github.com/python/cpython/commit/257f5be7f7fad37d0db6c145e534e5b7289d8804 -

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-03-02 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-03-02 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 75d2d945b4e28ca34506b2d4902367b61a8dff82 by Gregory Beauregard in branch 'main': bpo-46643: Fix stringized P.args/P.kwargs with get_type_hints (GH-31238) https://github.com/python/cpython/commit/75d2d945b4e28ca34506b2d4902367b61a8dff82 ---

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-03-02 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +29766 pull_request: https://github.com/python/cpython/pull/31646 ___ Python tracker _

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-02-09 Thread Gregory Beauregard
Gregory Beauregard added the comment: I wrote a PR that fixes the underlying issue here, but I'm leaving it as a draft while the discussion plays out. I think the stuff currently in the patch should be okay regardless of the discussion decision, because the underlying issue is that P.args an

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-02-09 Thread Gregory Beauregard
Change by Gregory Beauregard : -- keywords: +patch pull_requests: +29408 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31238 ___ Python tracker _

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-02-08 Thread Gregory Beauregard
Gregory Beauregard added the comment: I have made a thread on typing-sig to discuss this: https://mail.python.org/archives/list/typing-...@python.org/thread/WZ4BCFO4VZ7U4CZ4FSDQNFAKPG2KOGCL/ -- ___ Python tracker

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-02-08 Thread Gregory Beauregard
Gregory Beauregard added the comment: My general understanding has been that since Annotated exists primarily to allow interoperability between typing and non-typing uses of annotation space, and that this is quite clear in the PEP, most cases where this is not allowed (_especially_ at the t

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-02-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Should it? Annotated wraps types, and P.args/P.kwargs are not types. If make Annotated accepting P.args/P.kwargs (and possible other non-types, e.g. P), it is a new feature which should be publicly discussed first and documented. I do not thing it requires

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-02-04 Thread Gregory Beauregard
Gregory Beauregard added the comment: We can also fix this with my proposal in bpo-46644. I'm okay with either fix (that or implementing __call__), or both. -- ___ Python tracker ___

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-02-04 Thread Gregory Beauregard
Change by Gregory Beauregard : -- nosy: +sobolevn ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-02-04 Thread Gregory Beauregard
New submission from Gregory Beauregard : Consider the following. ``` import logging from typing import Annotated, Callable, ParamSpec, TypeVar T = TypeVar("T") P = ParamSpec("P") def add_logging(f: Callable[P, T]) -> Callable[P, T]: """A type-safe decorator to add logging to a function."""