Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[3.14] gh-132493: Remove __annotations__ usage in inspect._signature_is_functionlike (GH-133415)#133796

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
miss-islington wants to merge1 commit intopython:3.14
base:3.14
Choose a base branch
Loading
frommiss-islington:backport-cb6596c-3.14

Conversation

miss-islington
Copy link
Contributor

@miss-islingtonmiss-islington commentedMay 10, 2025
edited by bedevere-appbot
Loading

This check is potentially problematic because it could force evaluation of
annotations unnecessarily. This doesn't trigger for builtin objects (functions,
classes, or modules) with annotations, but it could trigger for third-party objects.

The check was not particularly useful anyway, because it succeeds if__annotations__
is a dict or None, so the only thing this did was guard against objects that have an
__annotations__ attribute that is of some other type. That doesn't seem particularly
useful, so I just removed the check.
(cherry picked from commitcb6596c)

Co-authored-by: Jelle Zijlstrajelle.zijlstra@gmail.com

…s_functionlike (pythonGH-133415)This check is potentially problematic because it could force evaluation ofannotations unnecessarily. This doesn't trigger for builtin objects (functions,classes, or modules) with annotations, but it could trigger for third-party objects.The check was not particularly useful anyway, because it succeeds if ``__annotations__``is a dict or None, so the only thing this did was guard against objects that have an``__annotations__`` attribute that is of some other type. That doesn't seem particularlyuseful, so I just removed the check.(cherry picked from commitcb6596c)Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@JelleZijlstraJelleZijlstraJelleZijlstra approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@miss-islington@JelleZijlstra

[8]ページ先頭

©2009-2025 Movatter.jp