diff --git a/pyproject.toml b/pyproject.toml index 2850ade6988c..b17677df41af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ # https://github.com/astral-sh/uv/issues/8666 name = "typeshed" version = "0" -requires-python = ">=3.9" # Minimum version to run tests, used by uv run +requires-python = ">=3.10" # Minimum version to run tests, used by uv run [tool.black] line-length = 130 @@ -147,6 +147,12 @@ extend-safe-fixes = [ "UP036", # Remove unnecessary `sys.version_info` blocks ] ignore = [ + ### + # TODO: Disabled temporarily, until Python 3.9 support is fully removed in + # May 2026. + ### + "UP035", # import from typing + "UP036", # Remove unnecessary `sys.version_info` blocks ### # Rules that can conflict with the formatter (Black) # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules diff --git a/stdlib/_collections_abc.pyi b/stdlib/_collections_abc.pyi index 319577c9284b..0fa81662dfbc 100644 --- a/stdlib/_collections_abc.pyi +++ b/stdlib/_collections_abc.pyi @@ -1,7 +1,7 @@ import sys from abc import abstractmethod from types import MappingProxyType -from typing import ( # noqa: Y022,Y038,UP035,Y057 +from typing import ( # noqa: Y022,Y038,UP035,Y057,RUF100 AbstractSet as Set, AsyncGenerator as AsyncGenerator, AsyncIterable as AsyncIterable, diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index efc51fe257ae..3c505241b352 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -37,7 +37,7 @@ from types import CellType, CodeType, GenericAlias, TracebackType # mypy crashes if any of {ByteString, Sequence, MutableSequence, Mapping, MutableMapping} # are imported from collections.abc in builtins.pyi -from typing import ( # noqa: Y022,UP035 +from typing import ( # noqa: Y022,UP035,RUF100 IO, Any, BinaryIO, diff --git a/stdlib/typing_extensions.pyi b/stdlib/typing_extensions.pyi index 8a9f0f3919ba..16cf0611a58a 100644 --- a/stdlib/typing_extensions.pyi +++ b/stdlib/typing_extensions.pyi @@ -30,7 +30,7 @@ from collections.abc import ( from contextlib import AbstractAsyncContextManager as AsyncContextManager, AbstractContextManager as ContextManager from re import Match as Match, Pattern as Pattern from types import GenericAlias, ModuleType -from typing import ( # noqa: Y022,Y037,Y038,Y039,UP035 +from typing import ( # noqa: Y022,Y037,Y038,Y039,UP035,RUF100 IO as IO, TYPE_CHECKING as TYPE_CHECKING, AbstractSet as AbstractSet,