mod_wsgi
mod_wsgi copied to clipboard
`mod_wsgi.Log.write()` doesn’t accept memoryview
When having sys.stderr.buffer.write(memoryview(b'test\n'))
in a WSGI script, it fails with “TypeError: write() argument 1 must be read-only bytes-like object, not memoryview”.
On mod_wsgi, sys.stderr.buffer
is a mod_wsgi.Log
object. Its write()
implementation accepts only read-only bytes-like objects, but it could be changed to accept all bytes-like objects. (On a related note, the method currently accepts unicode as well, which it probably shouldn’t.)