Serhiy Storchaka added the comment: I meant getting rid of memoryview at all and passing bytes buffer object directly to underlying write. But now I see that this idea perhaps is not feasible since we must write not only from the start of the buffer.
A writer like AuditableBytesIO is very attractive implementation. I used it multiple times, especially in tests. Your initial proposition LGTM, and perhaps this is only the solution applicable in maintained releases. Thus we should implement it in any case. In 3.6 we can add a warning. Note that there are two kinds of references to a buffer: a reference to memoryview object and new memoryview that refers to the same buffer. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26720> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com