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

Open Beginner friendly
#11,903 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
documentation

Research direction

Start by reading the contributing guideline and the discussion in typeshed PR 11890, especially the linked comment, to understand the existing convention. Document that newly added stdlib stub symbols should wait until supported type-checkers have updated their vendored typeshed version; done means the guidance is clear to contributors and the relevant guideline is updated.

Written by the indexing model from the issue text.

Description

project: policy

https://github.com/python/typeshed/pull/11890#discussion_r1597530831
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

Dominant language
Python
Stars
5.1k
Forks
2.1k
Avg merge
1d 13h
Merged PRs (30d)
73

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from python/typeshed

All issues in python/typeshed

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.