Title: Make ParamSpec.args/kwargs more useful objects
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.10
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Jelle Zijlstra Nosy List: Jelle Zijlstra, gvanrossum, kj, levkivskyi
Priority: normal Keywords: patch

Created on 2021-04-09 02:06 by Jelle Zijlstra, last changed 2021-04-11 02:57 by gvanrossum. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 25298 merged Jelle Zijlstra, 2021-04-09 02:48
Messages (2)
msg390583 - (view) Author: Jelle Zijlstra (Jelle Zijlstra) * (Python triager) Date: 2021-04-09 02:06
Currently, typing.ParamSpec.args and ParamSpec.kwargs are just object() instances, which makes them useless for runtime inspection of __annotations__. This type was introduced by PEP 612.

Instead, I propose to make them return some special helper object with __origin__ set to the underlying ParamSpec object. I'll work on a PR soon.
msg390763 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2021-04-11 02:57
New changeset 522433601a5c64603dab3d733f41a5db39d237eb by Jelle Zijlstra in branch 'master':
bpo-43783: Add ParamSpecArgs/Kwargs (GH-25298)
Date User Action Args
2021-04-11 02:57:21gvanrossumsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-04-11 02:57:11gvanrossumsetmessages: + msg390763
2021-04-09 14:07:08kjsetnosy: + kj
2021-04-09 02:48:12Jelle Zijlstrasetkeywords: + patch
stage: patch review
pull_requests: + pull_request24029
2021-04-09 02:06:20Jelle Zijlstrasetassignee: Jelle Zijlstra
2021-04-09 02:06:06Jelle Zijlstracreate