diff --git a/pyrightconfig.json b/pyrightconfig.json index c44602107c30..54d18ad0de17 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -42,4 +42,6 @@ "reportOverlappingOverload": "none", // The name of the self/cls parameter is out of typeshed's control. "reportSelfClsParameterName": "none", + // Not actionable in typeshed + "reportDeprecated": "none", } diff --git a/pyrightconfig.stricter.json b/pyrightconfig.stricter.json index 0cb7ed938ddf..cb2f73646459 100644 --- a/pyrightconfig.stricter.json +++ b/pyrightconfig.stricter.json @@ -109,4 +109,6 @@ "reportOverlappingOverload": "none", // The name of the self/cls parameter is out of typeshed's control. "reportSelfClsParameterName": "none", + // Not actionable in typeshed + "reportDeprecated": "none", } diff --git a/stdlib/ast.pyi b/stdlib/ast.pyi index a61b4e35fd56..5c9cafc189be 100644 --- a/stdlib/ast.pyi +++ b/stdlib/ast.pyi @@ -4,27 +4,30 @@ from _ast import * from _typeshed import ReadableBuffer, Unused from collections.abc import Iterator from typing import Any, TypeVar as _TypeVar, overload -from typing_extensions import Literal +from typing_extensions import Literal, deprecated if sys.version_info >= (3, 8): class _ABC(type): if sys.version_info >= (3, 9): def __init__(cls, *args: Unused) -> None: ... + @deprecated("Replaced by ast.Constant; removal scheduled for Python 3.14") class Num(Constant, metaclass=_ABC): value: int | float | complex - + @deprecated("Replaced by ast.Constant; removal scheduled for Python 3.14") class Str(Constant, metaclass=_ABC): value: str # Aliases for value, for backwards compatibility s: str - + @deprecated("Replaced by ast.Constant; removal scheduled for Python 3.14") class Bytes(Constant, metaclass=_ABC): value: bytes # Aliases for value, for backwards compatibility s: bytes - + @deprecated("Replaced by ast.Constant; removal scheduled for Python 3.14") class NameConstant(Constant, metaclass=_ABC): ... + + @deprecated("Replaced by ast.Constant; removal scheduled for Python 3.14") class Ellipsis(Constant, metaclass=_ABC): ... if sys.version_info >= (3, 9):