[issue44894] HTTP request handler should check sys.stderr for None before use for logging

2021-08-12 Thread Xiaoling Bao
Xiaoling Bao added the comment: It looks https://bugs.python.org/issue43348 has the same root cause as this one. When running with pythonservice.exe or pythonw.exe, sys.stderr will be None and thus causing crash when logging messages (calling sys.stderr.write). -- type: -> behavior

[issue44894] HTTP request handler should check sys.stderr for None before use for logging

2021-08-11 Thread Xiaoling Bao
New submission from Xiaoling Bao : This is about HTTP server library (found on Windows with python 3.9, not sure other platforms). In file Lib\http\server.py, we define: class BaseHTTPRequestHandler(...): def log_message(self, format, *args): sys.stderr.write(...) In certain cases, sys.