Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ParamSpec.args/kwargs more useful objects #87949

Closed
JelleZijlstra opened this issue Apr 9, 2021 · 2 comments
Closed

Make ParamSpec.args/kwargs more useful objects #87949

JelleZijlstra opened this issue Apr 9, 2021 · 2 comments
Assignees
Labels
3.10 stdlib

Comments

@JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented Apr 9, 2021

BPO 43783
Nosy @gvanrossum, @ilevkivskyi, @JelleZijlstra, @Fidget-Spinner
PRs
  • #25298
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/JelleZijlstra'
    closed_at = <Date 2021-04-11.02:57:21.727>
    created_at = <Date 2021-04-09.02:06:06.482>
    labels = ['library', '3.10']
    title = 'Make ParamSpec.args/kwargs more useful objects'
    updated_at = <Date 2021-04-11.02:57:21.726>
    user = 'https://github.com/JelleZijlstra'

    bugs.python.org fields:

    activity = <Date 2021-04-11.02:57:21.726>
    actor = 'gvanrossum'
    assignee = 'JelleZijlstra'
    closed = True
    closed_date = <Date 2021-04-11.02:57:21.727>
    closer = 'gvanrossum'
    components = ['Library (Lib)']
    creation = <Date 2021-04-09.02:06:06.482>
    creator = 'JelleZijlstra'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43783
    keywords = ['patch']
    message_count = 2.0
    messages = ['390583', '390763']
    nosy_count = 4.0
    nosy_names = ['gvanrossum', 'levkivskyi', 'JelleZijlstra', 'kj']
    pr_nums = ['25298']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue43783'
    versions = ['Python 3.10']

    @JelleZijlstra
    Copy link
    Member Author

    @JelleZijlstra JelleZijlstra commented Apr 9, 2021

    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.

    @JelleZijlstra JelleZijlstra added 3.10 stdlib labels Apr 9, 2021
    @JelleZijlstra JelleZijlstra self-assigned this Apr 9, 2021
    @gvanrossum
    Copy link
    Member

    @gvanrossum gvanrossum commented Apr 11, 2021

    New changeset 5224336 by Jelle Zijlstra in branch 'master':
    bpo-43783: Add ParamSpecArgs/Kwargs (GH-25298)
    5224336

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 stdlib
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants