Skip to content

Add optional requires_python to third party stubs metadata#10724

Merged
AlexWaygood merged 19 commits into
python:mainfrom
hamdanal:requires-python
Sep 24, 2023
Merged

Add optional requires_python to third party stubs metadata#10724
AlexWaygood merged 19 commits into
python:mainfrom
hamdanal:requires-python

Conversation

@hamdanal
Copy link
Copy Markdown
Contributor

@hamdanal hamdanal commented Sep 17, 2023

The typeshed part of #10722

This PR implements the following:

  • parse an optional requires_python field in the third party stubs
  • the field must be a valid Python version specifier that specifies the minimum Python version supported by the stub
  • the version must be at least the minimum version supported by typeshed (currently 3.7)
  • if the field exists, mypy, regression, and stubtest tests are skipped on Python versions that do not satisfy the requirement

stub-uploader still needs to learn about this field and include it in the setup.py file of the corresponding package with a fallback to the minimal version supported by typeshed.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants