Thanks for moving this forward! Not having an actual way to type buffers and having memoryview duck type to bytes are both clearly problematic and it's fantastic that we may soon have a solution here.
However, there is one aspect of current behaviour that I think is *not* particularly problematic, which is that we currently allow bytearray duck type to bytes (they're basically completely compatible, which is much more than int is to float).
For example, see:
(these examples wouldn't be better served by a Buffer type)
The main argument afaict for removing compatibility between just bytearray and bytes is removing a special case, but it's a special case everyone has implemented and that users rely on. And I'm not sure we'd want to get rid of special casing entirely, as you mention yourself here:
https://github.com/python/mypy/pull/12661#issuecomment-1107534322
The PEP only talks about compatibility between bytes and memoryview (which is clearly problematic). It would be good to include some words that talk more directly about compatibility between bytearray and bytes and to what extent (if any) type checkers should continue their current special casing.
(I personally lean on the side of keeping bytearray duck type compatible with bytes, but don't feel strongly)