Skip to content

Document that we can't use new stdlib symbols until added to type-checkers #11903

Open

Description

@Avasam

#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

Activity

  1. srittau commented on May 12, 2024

    @srittau
    Collaborator

    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?

  2. AlexWaygood commented on May 12, 2024

    @AlexWaygood
    Member

    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
  3. 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[/+] on May 18, 2024
  4. srittau commented on Jul 22, 2026

    @srittau
    Collaborator

    Since there are now at least five type checkers in active development, I propose the following concrete policy: We won't start using symbols from _typeshed in third-party stubs until at least 60 days have passed since they were added.

  5. added a commit that references this issue on Jul 22, 2026
    83e6df4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    project: policyOrganization of the typeshed project

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions