stdlib: more deprecations (#11009)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Jelle Zijlstra
2024-02-18 06:50:29 -08:00
committed by GitHub
parent 46b2635626
commit bba8cbd6f8
13 changed files with 119 additions and 28 deletions

View File

@@ -17,7 +17,7 @@ from importlib.machinery import ModuleSpec
# pytype crashes if types.MappingProxyType inherits from collections.abc.Mapping instead of typing.Mapping
from typing import Any, ClassVar, Literal, Mapping, Protocol, TypeVar, final, overload # noqa: Y022
from typing_extensions import ParamSpec, Self, TypeVarTuple
from typing_extensions import ParamSpec, Self, TypeVarTuple, deprecated
__all__ = [
"FunctionType",
@@ -138,8 +138,14 @@ class CodeType:
def co_name(self) -> str: ...
@property
def co_firstlineno(self) -> int: ...
@property
def co_lnotab(self) -> bytes: ...
if sys.version_info >= (3, 10):
@property
@deprecated("Will be removed in Python 3.14. Use the co_lines() method instead.")
def co_lnotab(self) -> bytes: ...
else:
@property
def co_lnotab(self) -> bytes: ...
@property
def co_freevars(self) -> tuple[str, ...]: ...
@property