-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-typingtype-featureA feature request or enhancementA feature request or enhancement
Description
Bug report
Bug description:
from typing import SupportsBytes
a = bytearray()
assert isinstance(a, SupportsBytes) # Fails
bytes(a) # No failurebytes.__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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-typingtype-featureA feature request or enhancementA feature request or enhancement