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 that we can't use new stdlib symbols until added to type-checkers #11903

Open
Avasam opened this issue May 12, 2024 · 2 comments
Open
Labels
project: policy Organization of the typeshed project

Comments

@Avasam
Copy link
Sponsor Collaborator

Avasam commented May 12, 2024

#11890 (comment)
An unwritten convention (because we've been bitten by it a few times in the past), is to not use newly added symbols from the stdlib stubs until all supported type-checkers (pyright, mypy, pytype??, realistically we're always waiting on mypy release because pyright releases so often) updated their vendored version of typeshed.

This is a suggestion to add this convention to the contributing guideline in a more official way, and to teach contributors about this unobvious gotcha.

Relates to #5835

@Avasam Avasam added the project: policy Organization of the typeshed project label May 12, 2024
@srittau
Copy link
Collaborator

srittau commented May 12, 2024

One of the ideas behind #5952 was to actually test third-party stubs using the vendored stdlib of the respective type checkers. Maybe we should resurrect that idea?

@AlexWaygood
Copy link
Member

AlexWaygood commented May 12, 2024

One of the ideas behind #5952 was to actually test third-party stubs using the vendored stdlib of the respective type checkers. Maybe we should resurrect that idea?

I don't think we should only test our third-party stubs against type checkers' vendored stdlib stubs, because it would mean we'd be blind to the impact changes we make to our stdlib stubs would have on our third-party stubs. That would:

  • mean we'd lose an important signal for when a change might be really disruptive for the broader community
  • possibly make upgrading our type checker pins much harder, because we might suddenly and unexpectedly have to deal with a significant number new of new errors in our third-party stubs that arise from changes we made to our stdlib stubs several months earlier

@Avasam Avasam changed the title Document that we can't use new stdlib symbols until a Document that we can't use new stdlib symbols until added to type-checkers May 18, 2024
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

No branches or pull requests

3 participants