Pekka Klärck <pekka.kla...@gmail.com> added the comment:

The same problem that caused problems to py.test caused problems also to Robot 
Framework:
http://code.google.com/p/robotframework/issues/detail?id=1079

I was surprised to notice this issue was closed as invalid although the problem 
didn't occur with Python 2.7 anymore. After a little more digging I noticed 
that the proposed fix has actually been done in r84282 as part of fixing issue 
9051. The fix doesn't check for `closed` attribute but instead silences 
possible ValueError.

We also noticed a variation of the problem: If the registered handler ever 
tries to write anything to its stream you also get an exception. We decided to 
silence all these errors with this code:

import logging
logging.raiseExceptions = False

Finally, I consider it a separate bug that logging.StreamHandler uses 
sys.stderr by default. It should use sys.__stderr__ instead.

----------
nosy: +pekka.klarck

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6333>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to