Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mod_wsgi.Log.write() doesn’t accept memoryview #863

Open
manueljacob opened this issue Nov 1, 2023 · 0 comments
Open

mod_wsgi.Log.write() doesn’t accept memoryview #863

manueljacob opened this issue Nov 1, 2023 · 0 comments

Comments

@manueljacob
Copy link

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant