Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment: I think that in r69448, the test does not match the code: codecs.getwriter('cp1251') has no attribute 'encoding', and no function in test_logging ever pass a stream with an explicit encoding.
Also, the test in emit() should be reversed, otherwise msg.encode() is called only when msg is a 8bit string. And in this case, a unicode string should be passed to the stream. See attached patch. The codecs.getwriter should probably grow an 'encoding' attribute automatically, but this is another issue. ---------- assignee: -> vsajip nosy: +amaury.forgeotdarc, vsajip Added file: http://bugs.python.org/file13705/logging_encoding.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5768> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com