diff --git a/stdlib/_typeshed/__init__.pyi b/stdlib/_typeshed/__init__.pyi index c37d55a7d..f32224401 100644 --- a/stdlib/_typeshed/__init__.pyi +++ b/stdlib/_typeshed/__init__.pyi @@ -298,9 +298,6 @@ class SupportsGetItemBuffer(SliceableBuffer, IndexableBuffer, Protocol): class SizedBuffer(Sized, Buffer, Protocol): ... -# for compatibility with third-party stubs that may use this -_BufferWithLen: TypeAlias = SizedBuffer # not stable # noqa: Y047 - ExcInfo: TypeAlias = tuple[type[BaseException], BaseException, TracebackType] OptExcInfo: TypeAlias = ExcInfo | tuple[None, None, None] diff --git a/stubs/python-xlib/Xlib/protocol/display.pyi b/stubs/python-xlib/Xlib/protocol/display.pyi index 1808ea600..04f7be303 100644 --- a/stubs/python-xlib/Xlib/protocol/display.pyi +++ b/stubs/python-xlib/Xlib/protocol/display.pyi @@ -1,4 +1,4 @@ -from _typeshed import _BufferWithLen +from _typeshed import SizedBuffer from socket import socket from typing import Literal, TypeVar, overload @@ -16,7 +16,7 @@ class bytesview: @overload def __init__(self, data: bytes | bytesview, offset: int, size: int) -> None: ... @overload - def __init__(self, data: _BufferWithLen, offset: int = 0, size: int | None = None) -> None: ... + def __init__(self, data: SizedBuffer, offset: int = 0, size: int | None = None) -> None: ... @overload def __getitem__(self, key: slice) -> bytes: ... @overload