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

Document _typeshed #5486

Closed
srittau opened this issue May 17, 2021 · 3 comments · Fixed by #5501
Closed

Document _typeshed #5486

srittau opened this issue May 17, 2021 · 3 comments · Fixed by #5501
Labels
project: policy Organization of the typeshed project

Comments

@srittau
Copy link
Collaborator

srittau commented May 17, 2021

This came up in pallets/werkzeug#2130. Maybe it's time we started to document how _typeshed works outside of the file itself. I also think that we should give some API guarantees as people have started to use it outside typeshed itself. Any ideas?

Concerning the latter: I think we should document which aliases etc. are considered stable and we could commit for them to remain stable. To remove or incompatibly change a "stable" alias, we have to remove it from the stable list and mark it deprecated for at least a year.

@srittau srittau added the project: policy Organization of the typeshed project label May 17, 2021
@JelleZijlstra
Copy link
Member

Your ideas sound good. I think it would also be nice to be able to import it without if TYPE_CHECKING. Perhaps we could add the stable parts of _typeshed to typing_extensions, though that would mean a change in purpose for that module.

@srittau
Copy link
Collaborator Author

srittau commented May 17, 2021

+1 on typing_extensions. We could also try to add a few aliases to the stdlib. In fact I opened bpo-42012 a while ago, but got not response.

@hauntsaninja
Copy link
Collaborator

I think wsgiref.types might be a slightly harder sell for CPython than just including a couple very useful Protocols in typing. But yes, would love to move things into typing_extensions and typing... Using _typeshed in ones own code is hacky and generally bad UX.

srittau added a commit to srittau/typeshed that referenced this issue May 19, 2021
Akuli pushed a commit that referenced this issue May 19, 2021
* Document _typeshed

Closes: #5486

* Allow README.md files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project: policy Organization of the typeshed project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants