Skip to content

Implement PEP 695 #103763

Description

@JelleZijlstra

We should implement PEP-695. Some discussion of the implementation is at https://github.com/erictraut/cpython/issues. I will open a draft PR momentarily.

TODO:

  • Evaluate TypeAlias values
  • Lazy evaluation for TypeVar bounds
  • More tests
  • Fix remaining tests in test_typing.py

Linked PRs

Activity

  1. preveen-stack commented on Apr 24, 2023

    @preveen-stack

    PEP 695 – Type Parameter Syntax

  2. sunmy2019 commented on Apr 24, 2023

    @sunmy2019
    Member

    Wow. This syntax looks so cool. It reminds me of many generic expressions in other languages, such as C++ and Rust. (while the increases the learning curve of Python)

    I'll see what I can help here.

  3. preveen-stack commented on Apr 25, 2023

    @preveen-stack

    I feel we should defend the intuitive readability of python irrespective of what.

  4. added a commit that references this issue on May 16, 2023
  5. JelleZijlstra commented on May 16, 2023

    @JelleZijlstra
    MemberAuthor

    The implementation is done. The next step is #103921, the documentation.

  6. added a commit that references this issue on May 16, 2023
  7. charliermarsh commented on Jun 22, 2023

    @charliermarsh

    @JelleZijlstra - I'm sorry if this is the wrong place to ask, but is the specification and implementation of PEP 695 sufficiently stabilized that I could look into updating Ruff's parser and semantic model to support them?

  8. JelleZijlstra commented on Jun 22, 2023

    @JelleZijlstra
    MemberAuthor

    I don't expect more major changes, no. There are currently no open PEP 695-related bugs; if anything else changes it would be as a result of new feedback we receive during the beta phase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions