python / python/typeshed

Stubs that require a version of python higher than the minimum supported by typeshed

Open
#10,722 15 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

project: infrastructure
Dominant language
Python
Stars
5.1k
Forks
2.1k
Avg merge
1d 19h
Merged PRs (30d)
82

Description

In #10721, the seaborn stubs depend on matplotlib that only included a py.typed marker file in version 3.8.
matplotlib version 3.8 requires python >=3.9 which leads to the mypy tests failing on python 3.8.

Alex Waygood suggests adding a requires-python field to METADATA.toml and teaching stub-uploader to include it in the generated setup.py https://github.com/python/typeshed/pull/10721#issuecomment-1722454399.

Please let us know what you think about this idea or if you have another solution.

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.

Research direction

Start by reviewing METADATA.toml, stub-uploader, and the generated setup.py path described in the issue, then reproduce the mypy test failure on Python 3.8 caused by the seaborn and matplotlib dependency. Compare the proposed requires-python metadata flow with the existing package generation behavior. Done means the supported Python requirement is represented in generated packages and the Python 3.8 tests no longer fail for this case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.