Message 239027 - Python tracker
ouch. haven't thought of this.
OTOH, just plain io with your example:
with open('xy', 'wb') as f:
f.write(y)
Traceback (most recent call last):
File "<pyshell#29>", line 2, in <module>
f.write(y)
BufferError: memoryview: underlying buffer is not C-contiguous
fails too and after all that's not too surprising.
In a sense, the old behavior was an artefact of silently copying the memoryview to bytes. You never used it *directly*.
But, yes, it is a change in (undocumented) behavior :(