Bug report
Bug description:
from typing import SupportsBytes
a = bytearray()
assert isinstance(a, SupportsBytes) # Fails
bytes(a) # No failure
bytes.__bytes__ was added in 3.11 so that bytes could match SupportsBytes, so I would think this should work as well.
CPython versions tested on:
3.14
Operating systems tested on:
Linux
Bug report
Bug description:
bytes.__bytes__was added in 3.11 so thatbytescould matchSupportsBytes, so I would think this should work as well.CPython versions tested on:
3.14
Operating systems tested on:
Linux