Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Alex Waygood <[email protected]>
  • Loading branch information
donbarbos and AlexWaygood authored Aug 10, 2025
commit ebc9644479925ebf244215f3d638b2a8111594f9
4 changes: 2 additions & 2 deletions stdlib/_frozen_importlib.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class BuiltinImporter(importlib.abc.MetaPathFinder, importlib.abc.InspectLoader)
# Loader
if sys.version_info < (3, 12):
@staticmethod
@deprecated("Deprecated since Python 3.4; removed in Python 3.12. Now it's done automatically.")
@deprecated("Deprecated since Python 3.4; removed in Python 3.12. The module spec is now used by the import machinery to generate a module repr.")
def module_repr(module: types.ModuleType) -> str: ...
if sys.version_info >= (3, 10):
@staticmethod
Expand Down Expand Up @@ -105,7 +105,7 @@ class FrozenImporter(importlib.abc.MetaPathFinder, importlib.abc.InspectLoader):
# Loader
if sys.version_info < (3, 12):
@staticmethod
@deprecated("Deprecated since Python 3.4; removed in Python 3.12. Now it's done automatically.")
@deprecated("Deprecated since Python 3.4; removed in Python 3.12. The module spec is now used by the import machinery to generate a module repr.")
def module_repr(m: types.ModuleType) -> str: ...
if sys.version_info >= (3, 10):
@staticmethod
Expand Down
6 changes: 3 additions & 3 deletions stdlib/_frozen_importlib_external.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ if sys.version_info >= (3, 11):
def get_resource_reader(self, module: types.ModuleType) -> importlib.readers.NamespaceReader: ...
if sys.version_info < (3, 12):
@staticmethod
@deprecated("Deprecated since Python 3.4; removed in Python 3.12. Now it's done automatically.")
@deprecated("Deprecated since Python 3.4; removed in Python 3.12. The module spec is now used by the import machinery to generate a module repr.")
def module_repr(module: types.ModuleType) -> str: ...

_NamespaceLoader = NamespaceLoader
Expand All @@ -178,12 +178,12 @@ else:
def load_module(self, fullname: str) -> types.ModuleType: ...
if sys.version_info >= (3, 10):
@staticmethod
@deprecated("Deprecated since Python 3.4; removed in Python 3.12. Now it's done automatically.")
@deprecated("Deprecated since Python 3.4; removed in Python 3.12. The module spec is now used by the import machinery to generate a module repr.")
def module_repr(module: types.ModuleType) -> str: ...
def get_resource_reader(self, module: types.ModuleType) -> importlib.readers.NamespaceReader: ...
else:
@classmethod
@deprecated("Deprecated since Python 3.4; removed in Python 3.12. Now it's done automatically.")
@deprecated("Deprecated since Python 3.4; removed in Python 3.12. The module spec is now used by the import machinery to generate a module repr.")
def module_repr(cls, module: types.ModuleType) -> str: ...

if sys.version_info >= (3, 13):
Expand Down
8 changes: 4 additions & 4 deletions stdlib/ast.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1098,16 +1098,16 @@ class Constant(expr):
if sys.version_info < (3, 14):
# Aliases for value, for backwards compatibility
@property
@deprecated("Will be removed in Python 3.14. Use value instead.")
@deprecated("Will be removed in Python 3.14. Use `value` instead.")
def n(self) -> _ConstantValue: ...
@n.setter
@deprecated("Will be removed in Python 3.14. Use value instead.")
@deprecated("Will be removed in Python 3.14. Use `value` instead.")
def n(self, value: _ConstantValue) -> None: ...
@property
@deprecated("Will be removed in Python 3.14. Use value instead.")
@deprecated("Will be removed in Python 3.14. Use `value` instead.")
def s(self) -> _ConstantValue: ...
@s.setter
@deprecated("Will be removed in Python 3.14. Use value instead.")
@deprecated("Will be removed in Python 3.14. Use `value` instead.")
def s(self, value: _ConstantValue) -> None: ...

def __init__(self, value: _ConstantValue, kind: str | None = None, **kwargs: Unpack[_Attributes]) -> None: ...
Expand Down
24 changes: 12 additions & 12 deletions stdlib/asyncio/trsock.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,33 @@ class TransportSocket:
def setblocking(self, flag: bool) -> None: ...
if sys.version_info < (3, 11):
def _na(self, what: str) -> None: ...
@deprecated("Initially it was deprecated; removed in Python 3.11.")
@deprecated("Removed in Python 3.11")
def accept(self) -> tuple[socket.socket, _RetAddress]: ...
@deprecated("Initially it was deprecated; removed in Python 3.11.")
@deprecated("Removed in Python 3.11")
def connect(self, address: _Address) -> None: ...
@deprecated("Initially it was deprecated; removed in Python 3.11.")
@deprecated("Removed in Python 3.11")
def connect_ex(self, address: _Address) -> int: ...
@deprecated("Initially it was deprecated; removed in Python 3.11.")
@deprecated("Removed in Python 3.11")
def bind(self, address: _Address) -> None: ...
if sys.platform == "win32":
@deprecated("Initially it was deprecated; removed in Python 3.11.")
@deprecated("Removed in Python 3.11")
def ioctl(self, control: int, option: int | tuple[int, int, int] | bool) -> None: ...
else:
@deprecated("Initially it was deprecated; removed in Python 3.11.")
@deprecated("Removed in Python 3.11")
def ioctl(self, control: int, option: int | tuple[int, int, int] | bool) -> NoReturn: ...

@deprecated("Initially it was deprecated; removed in Python 3.11.")
@deprecated("Removed in Python 3.11")
def listen(self, backlog: int = ..., /) -> None: ...
@deprecated("Initially it was deprecated; removed in Python 3.11.")
@deprecated("Removed in Python 3.11")
def makefile(self) -> BinaryIO: ...
@deprecated("Initially it was deprecated; removed in Python 3.11.")
@deprecated("Rmoved in Python 3.11")
def sendfile(self, file: BinaryIO, offset: int = ..., count: int | None = ...) -> int: ...
@deprecated("Initially it was deprecated; removed in Python 3.11.")
@deprecated("Removed in Python 3.11")
def close(self) -> None: ...
@deprecated("Initially it was deprecated; removed in Python 3.11.")
@deprecated("Removed in Python 3.11")
def detach(self) -> int: ...
if sys.platform == "linux":
@deprecated("Initially it was deprecated; removed in Python 3.11.")
@deprecated("Removed in Python 3.11")
def sendmsg_afalg(
self, msg: Iterable[ReadableBuffer] = ..., *, op: int, iv: Any = ..., assoclen: int = ..., flags: int = ...
) -> int: ...
Expand Down
2 changes: 1 addition & 1 deletion stdlib/importlib/_abc.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if sys.version_info >= (3, 10):
class Loader(metaclass=ABCMeta):
def load_module(self, fullname: str) -> types.ModuleType: ...
if sys.version_info < (3, 12):
@deprecated("Deprecated since Python 3.4; removed in Python 3.12. Now it's done automatically.")
@deprecated("Deprecated since Python 3.4; removed in Python 3.12. The module spec is now used by the import machinery to generate a module repr.")
def module_repr(self, module: types.ModuleType) -> str: ...

def create_module(self, spec: ModuleSpec) -> types.ModuleType | None: ...
Expand Down
2 changes: 1 addition & 1 deletion stdlib/inspect.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ else:
def formatannotationrelativeto(object: object) -> Callable[[object], str]: ...

if sys.version_info < (3, 11):
@deprecated("Deprecated since Python 3.5; removed in Python 3.11. Use `inspect.signature()` and `Signature` object instead.")
@deprecated("Deprecated since Python 3.5; removed in Python 3.11. Use `inspect.signature()` and the `Signature` class instead.")
def formatargspec(
args: list[str],
varargs: str | None = None,
Expand Down
2 changes: 1 addition & 1 deletion stdlib/pathlib/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ class Path(PurePath):
def write_text(self, data: str, encoding: str | None = None, errors: str | None = None) -> int: ...
if sys.version_info < (3, 12):
if sys.version_info >= (3, 10):
@deprecated("Deprecated since Python 3.10; removed in Python 3.12. Use hardlink_to() instead.")
@deprecated("Deprecated since Python 3.10; removed in Python 3.12. Use `hardlink_to()` instead.")
def link_to(self, target: StrOrBytesPath) -> None: ...
else:
def link_to(self, target: StrOrBytesPath) -> None: ...
Expand Down
4 changes: 2 additions & 2 deletions stdlib/pkgutil.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ class ModuleInfo(NamedTuple):
def extend_path(path: _PathT, name: str) -> _PathT: ...

if sys.version_info < (3, 12):
@deprecated("Deprecated since Python 3.3; removed in Python 3.12. Use `importlib` module instead.")
@deprecated("Deprecated since Python 3.3; removed in Python 3.12. Use the `importlib` module instead.")
class ImpImporter:
def __init__(self, path: StrOrBytesPath | None = None) -> None: ...

@deprecated("Deprecated since Python 3.3; removed in Python 3.12. Use `importlib` module instead.")
@deprecated("Deprecated since Python 3.3; removed in Python 3.12. Use the `importlib` module instead.")
class ImpLoader:
def __init__(self, fullname: str, file: IO[str], filename: StrOrBytesPath, etc: tuple[str, str, int]) -> None: ...

Expand Down
4 changes: 2 additions & 2 deletions stdlib/urllib/request.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def urlretrieve(
def urlcleanup() -> None: ...

if sys.version_info < (3, 14):
@deprecated("Deprecated since Python 3.3; removed in 3.14. Use newer urlopen functions and methods.")
@deprecated("Deprecated since Python 3.3; removed in 3.14. Use newer `urlopen` functions and methods.")
class URLopener:
version: ClassVar[str]
def __init__(self, proxies: dict[str, str] | None = None, **x509: str) -> None: ...
Expand Down Expand Up @@ -356,7 +356,7 @@ if sys.version_info < (3, 14):
def open_unknown_proxy(self, proxy: str, fullurl: str, data: ReadableBuffer | None = None) -> None: ... # undocumented
def __del__(self) -> None: ...

@deprecated("Deprecated since Python 3.3; removed in 3.14. Use newer urlopen functions and methods.")
@deprecated("Deprecated since Python 3.3; removed in 3.14. Use newer `urlopen` functions and methods.")
class FancyURLopener(URLopener):
def prompt_user_passwd(self, host: str, realm: str) -> tuple[str, str]: ...
def get_user_passwd(self, host: str, realm: str, clear_cache: int = 0) -> tuple[str, str]: ... # undocumented
Expand Down
Loading