Skip to content

Document PEP 695 #103921

@JelleZijlstra

Description

@JelleZijlstra

We should document PEP-695 for Python 3.12 (issue #103763, PR #103764 for implementation). I am leaving docs out of the PR to avoid complicating an already huge PR with a tight deadline, but let's start thinking about what we need to document:

  • New AST nodes in ast.rst
  • Language reference should be updated to include the new grammar changes
  • Language reference should be updated to reflect new scoping rules (https://docs.python.org/3.12/reference/executionmodel.html#naming-and-binding)
  • typing.rst should list the PEP
  • typing.rst should mention that TypeVar gained an infer_variance argument and that it now supports lazily evaluated bounds/constraints
  • Examples of generics in typing.rst should use the new syntax
  • typing.rst should document the new TypeAliasType
  • typing.TypeAlias should be mentioned as deprecated (including in the deprecation timeline at the bottom of typing.rst), and any examples of type aliases should be updated to use the new syntax
  • New opcodes need to be mentioned in dis.rst. dis.dis docs should mention new contexts where nested code objects can appear. The CALL_INTRINSIC_1 and 2 opcodes should mention the new intrinsics.

Linked PRs

Metadata

Metadata

Assignees

Labels

3.12only security fixesdocsDocumentation in the Doc dirtopic-typing

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy