@@ -633,8 +633,13 @@ class bytes(Sequence[int]):
633633def translate (self ,table :ReadableBuffer | None ,/ ,delete :ReadableBuffer = b"" )-> bytes : ...
634634def upper (self )-> bytes : ...
635635def zfill (self ,width :SupportsIndex ,/ )-> bytes : ...
636- @classmethod
637- def fromhex (cls ,string :str ,/ )-> Self : ...
636+ if sys .version_info >= (3 ,14 ):
637+ @classmethod
638+ def fromhex (cls ,string :str | ReadableBuffer ,/ )-> Self : ...
639+ else :
640+ @classmethod
641+ def fromhex (cls ,string :str ,/ )-> Self : ...
642+
638643@staticmethod
639644def maketrans (frm :ReadableBuffer ,to :ReadableBuffer ,/ )-> bytes : ...
640645def __len__ (self )-> int : ...
@@ -738,8 +743,13 @@ class bytearray(MutableSequence[int]):
738743def translate (self ,table :ReadableBuffer | None ,/ ,delete :bytes = b"" )-> bytearray : ...
739744def upper (self )-> bytearray : ...
740745def zfill (self ,width :SupportsIndex ,/ )-> bytearray : ...
741- @classmethod
742- def fromhex (cls ,string :str ,/ )-> Self : ...
746+ if sys .version_info >= (3 ,14 ):
747+ @classmethod
748+ def fromhex (cls ,string :str | ReadableBuffer ,/ )-> Self : ...
749+ else :
750+ @classmethod
751+ def fromhex (cls ,string :str ,/ )-> Self : ...
752+
743753@staticmethod
744754def maketrans (frm :ReadableBuffer ,to :ReadableBuffer ,/ )-> bytes : ...
745755def __len__ (self )-> int : ...
@@ -846,11 +856,15 @@ class memoryview(Sequence[_I]):
846856def hex (self ,sep :str | bytes = ...,bytes_per_sep :SupportsIndex = 1 )-> str : ...
847857def __buffer__ (self ,flags :int ,/ )-> memoryview : ...
848858def __release_buffer__ (self ,buffer :memoryview ,/ )-> None : ...
859+ if sys .version_info >= (3 ,14 ):
860+ def index (self ,value :object ,start :SupportsIndex = 0 ,stop :SupportsIndex = sys .maxsize ,/ )-> int : ...
861+ def count (self ,value :object ,/ )-> int : ...
862+ else :
863+ # These are inherited from the Sequence ABC, but don't actually exist on memoryview.
864+ # See https://github.com/python/cpython/issues/125420
865+ index :ClassVar [None ]# type: ignore[assignment]
866+ count :ClassVar [None ]# type: ignore[assignment]
849867
850- # These are inherited from the Sequence ABC, but don't actually exist on memoryview.
851- # See https://github.com/python/cpython/issues/125420
852- index :ClassVar [None ]# type: ignore[assignment]
853- count :ClassVar [None ]# type: ignore[assignment]
854868if sys .version_info >= (3 ,14 ):
855869def __class_getitem__ (cls ,item :Any ,/ )-> GenericAlias : ...
856870