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

Typing PEPs: Link to the typing spec as canonical documentation #3579

Open
14 of 16 tasks
JelleZijlstra opened this issue Dec 11, 2023 · 8 comments
Open
14 of 16 tasks

Typing PEPs: Link to the typing spec as canonical documentation #3579

JelleZijlstra opened this issue Dec 11, 2023 · 8 comments

Comments

@JelleZijlstra
Copy link
Member

JelleZijlstra commented Dec 11, 2023

The text of typing PEPs has often served as the canonical reference for how aspects of the type system work. Now that we have the typing spec in place, we should link to it as the canonical documentation, just as we do for packing PEPs that link to packaging.python.org.

(Cross-referencing python/typing#1531, which should make this easier by adding more link targets within the spec.)

TODO:

From https://peps.python.org/topic/typing/#accepted-peps-accepted-may-not-be-implemented-yet:

Later:

  • 563 Postponed Evaluation of Annotations: 3.7 - mark as Superseded by PEP 649 once that lands (hopefully in 3.13)
@hugovk
Copy link
Member

hugovk commented Jan 15, 2024

And PR #3575 added the ability to add canonical link banners to the typing spec via intersphinx, like:

.. canonical-typing-spec:: :ref:`typing:paramspec`

@hugovk
Copy link
Member

hugovk commented Feb 10, 2024

I've updated the OP with a checklist.

@hugovk
Copy link
Member

hugovk commented Feb 15, 2024

[ ] 563 Postponed Evaluation of Annotations: 3.7

Where is the spec for this one?

This was referenced Feb 15, 2024
@JelleZijlstra
Copy link
Member Author

PEP 563 was mostly about runtime behavior, not typing behavior. I think it should not be marked final, but Superseded by PEP 649 once that lands (hopefully in 3.13).

@hugovk
Copy link
Member

hugovk commented Feb 15, 2024

  • 604 Allow writing union types as X | Y: 3.10
  • 688 Making the buffer protocol accessible in Python: 3.12
  • 692 Using TypedDict for more precise **kwargs typing: 3.12

And how about the specs for these three?

@AlexWaygood
Copy link
Member

[ ] 604 Allow writing union types as X | Y: 3.10

https://docs.python.org/3/library/stdtypes.html#union-type might do pretty well for that one

@JelleZijlstra
Copy link
Member Author

688 should point to https://docs.python.org/3/reference/datamodel.html#emulating-buffer-types.

692 should point to https://typing.readthedocs.io/en/latest/spec/callables.html#unpack-for-keyword-arguments

@hugovk
Copy link
Member

hugovk commented Mar 24, 2024

Almost done!

https://peps.python.org/topic/typing/#accepted-peps-accepted-may-not-be-implemented-yet shows:

Accepted PEPs (accepted; may not be implemented yet)

  PEP Title Authors  
SA 563 Postponed Evaluation of Annotations Łukasz Langa 3.7
SA 646 Variadic Generics Mark Mendoza, Matthew Rahtz, Pradeep Kumar Srinivasan, Vincent Siles 3.11
SA 649 Deferred Evaluation Of Annotations Using Descriptors Larry Hastings 3.13
SA 696 Type Defaults for Type Parameters James Hilton-Balfe 3.13
SA 702 Marking deprecations using the type system Jelle Zijlstra 3.13
SA 705 TypedDict: Read-only items Alice Purcell 3.13

@hugovk hugovk mentioned this issue May 11, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@JelleZijlstra @hugovk @AlexWaygood and others