[issue23016] uncatched exception in lib/warnings.py when executed with pythonw

2014-12-09 Thread stockbsd Li
stockbsd Li added the comment: 1. py2 is unaffected, because stderr/stdout is not None in py2's pythonw and the catch works correctly. 2. as to py3, I prefer this patch: - execpt OSError: + execpt: -- ___ Python tracker rep...@bugs.python.org

[issue23016] uncatched exception in lib/warnings.py when executed with pythonw

2014-12-08 Thread stockbsd Li
New submission from stockbsd Li: in py3k, the following simple code will throw an uncatched exception when executed with pythonw: import warnings warnings.warn('test') the problem occurs in showarning function: in py3k's pythonw , stderr/stdout is set to None, so the file.write