FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Avoid eagerly evaluating annotations · Issue #132493 · python/cpython · GitHub

Repository navigation

Avoid eagerly evaluating annotations #132493

Open

Description

Activity

  1. added a commit that references this issue on Apr 14, 2025
  2. JelleZijlstra commented on Apr 14, 2025

    MemberAuthor

    Other cases from a quick audit:

    • typing._proto_hook eagerly evaluates annotations. Looks like this could trigger on code like isinstance(X, SomeProtocol) where X has deferred annotations. It doesn't need to know the value of the annotations, only what keys exist.
    • inspect._signature_is_functionlike looks for the presence of annotations to decide that something is functionlike. Maybe it should look for __annotate__ instead?
    • pydoc in two places looks for the presence of annotations for something with lambdas that I haven't fully deciphered
    • reprlib.recursive_repr creates a wrapper function that inherits __annotations__. It should probably use __annotate__ instead.
  3. added
    type-featureA feature request or enhancement
    performancePerformance or resource usage
    stdlibStandard Library Python modules in the Lib/ directory
    type-bugAn unexpected behavior, bug, or error
    and removed
    type-featureA feature request or enhancement
    on Apr 14, 2025
  4. added 2 commits that reference this issue on Apr 14, 2025
  5. added 4 commits that reference this issue on Apr 15, 2025
  6. added 4 commits that reference this issue on May 4, 2025
  7. added a commit that references this issue on May 10, 2025
  8. added a commit that references this issue on May 26, 2025
  9. added 2 commits that reference this issue on Jul 12, 2025
  10. added a commit that references this issue on Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL