Skip to content

Warn about too old python-version #201

Description

@MichaReiser

It might be good to print a warning to the terminal if we resolve the user's configuration settings to a requires-python version less than typeshed's oldest supported version. Typeshed exposes this information in this field here in its pyproject.toml file (the intention is that it could be used by tools vendoring typeshed as well as by typeshed's internal tools). It doesn't look like we currently vendor typeshed's pyproject.toml file as part of our typeshed syncs, but we could easily start doing so. The reason why I think we should print a warning is that people might think that we'll accurately understand the Python 3.7 stdlib if they put requires-python = ">= 3.7" in their pyproject.toml file -- but we won't, because typeshed deleted the pre-Python-3.8 branches when it dropped support for Python 3.7. The reason why it should be a suppressible warning rather than an error is that the user might have Python <3.8 branches in their own code.

Originally posted by @AlexWaygood in astral-sh/ruff#16028 (comment)

Metadata

Metadata

Assignees

Labels

configurationRelated to settings and configuration

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions