[issue20355] -W command line options should have higher priority than PYTHONWARNINGS environmental variable

Antoine Pitrou report at bugs.python.org
Fri Jan 24 00:30:24 CET 2014


Antoine Pitrou added the comment:

About the patch (note the code review tool hasn't accepted it, so I'm commenting here):
- in the tests, I think comparing stderr as-is will fail under Windows, where the line separator is b"\r\n"; better call splitlines() first
- in the tests, I think it would be better to use test.script_helper.assert_python_ok() (it will automate some stuff for you), even though other tests don't in that file
- in main.c, you need to Py_DECREF warning_options when you are done with it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20355>
_______________________________________


More information about the Python-bugs-list mailing list