hashlib: update() raises TypeError when given memoryview (e.g. BytesIO)
This is causing problems with csv23 package.
Trivial reproducer:
import hashlib
import io
hashlib.new('sha512').update(io.BytesIO().getbuffer())
Exception:
Traceback (most recent call last):
File "test.py", line 4, in <module>
hashlib.new('sha512').update(io.BytesIO().getbuffer())
File "/usr/lib/pypy3.6/lib_pypy/_hashlib/__init__.py", line 59, in update
buf = ffi.from_buffer(string)
TypeError: from_buffer() got a 'memoryview' object, which supports the buffer interface but cannot be rendered as a plain raw address on PyPy