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

TypedDict inspect.signature error #90606

Closed
jhwang mannequin opened this issue Jan 20, 2022 · 4 comments
Closed

TypedDict inspect.signature error #90606

jhwang mannequin opened this issue Jan 20, 2022 · 4 comments
Labels
3.10 only security fixes stdlib Python modules in the Lib dir topic-typing

Comments

@jhwang
Copy link
Mannequin

jhwang mannequin commented Jan 20, 2022

BPO 46448
Nosy @serhiy-storchaka, @JelleZijlstra, @tirkarthi

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 = None
closed_at = None
created_at = <Date 2022-01-20.23:20:43.587>
labels = ['library', '3.10']
title = 'TypedDict inspect.signature error'
updated_at = <Date 2022-01-21.08:31:24.912>
user = 'https://bugs.python.org/jhwang'

bugs.python.org fields:

activity = <Date 2022-01-21.08:31:24.912>
actor = 'xtreak'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2022-01-20.23:20:43.587>
creator = 'jhwang'
dependencies = []
files = []
hgrepos = []
issue_num = 46448
keywords = []
message_count = 2.0
messages = ['411056', '411097']
nosy_count = 4.0
nosy_names = ['serhiy.storchaka', 'JelleZijlstra', 'xtreak', 'jhwang']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue46448'
versions = ['Python 3.10']

@jhwang
Copy link
Mannequin Author

jhwang mannequin commented Jan 20, 2022

I have Python 3.10.1 (Dec, 2021) installed and I see an error when inspecting signature of TypedDict class. This is the same issue reported on bpo-43006 (msg385535 - (view)). It was marked as resolved but the error looks persistent. Can someone confirm if this was fixed or any release version with the fix?

    import inspect

    class T(typing.TypedDict):
        a: int

    print(inspect.signature(T))

was (*args, **kwargs) and now raises ValueError: no signature found for builtin type <class 'dict'>

@jhwang jhwang mannequin added 3.10 only security fixes stdlib Python modules in the Lib dir labels Jan 20, 2022
@tirkarthi
Copy link
Member

This could be due to bpo-40187

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@gvanrossum
Copy link
Member

Since inspect.signature(dict) also fails I don't see why it should be made to pass for TypedDict specifically.

@gvanrossum
Copy link
Member

Rejected, see discussion in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.10 only security fixes stdlib Python modules in the Lib dir topic-typing
Projects
None yet
Development

No branches or pull requests

3 participants