typing icon indicating copy to clipboard operation
typing copied to clipboard

Integrate the Type Stubs document into the spec

Open srittau opened this issue 1 year ago • 3 comments

The Type Stubs document (source/stubs.rst) is based on a proposed PEP by @rchen152, @JelleZijlstra, @Solumin, and myself to describe the allowed elements of type stubs. It was turned into kind of a proto-spec document, instead of a PEP. I haven't reviewed it in detail, but I think at least the "spec" parts of this document should be moved to the spec: chapters "Syntax" and "Supported Constructs". They might need updating, though. The "Distribution" chapter is mostly redundant with the spec anyway. The other chapters should probably moved to other documents, like "Writing and Maintaining Stub Files".

srittau avatar Jan 24 '24 13:01 srittau

Agree that the sections you flagged should be incorporated into the spec, with some updates.

For example, the "Syntax" section says stubs should follow 3.7 syntax, but 3.7 is dead now; we should instead say stubs should follow the syntax of the earliest Python version that is not EOL yet.

JelleZijlstra avatar Jan 24 '24 17:01 JelleZijlstra

I'd like to take a stab at this, if that's okay.

rchen152 avatar Jun 26 '24 22:06 rchen152

Thanks for volunteering, @rchen152.

There's overlap between the Type Stubs document and the Typing Python Libraries document. I'd love to see these unified when this content is added to the typing spec.

erictraut avatar Jun 26 '24 22:06 erictraut