Author mhammond
Recipients mhammond, vinay.sajip
Date 2008-09-04.03:47:14
SpamBayes Score 4.09978e-09
Marked as misclassified No
Message-id <>
It appears r66103 introduced a regression - file objects are treated as
having an encoding, so non-ascii data fails.  It was further complicated
by the fact that file objects in 2.6 have an 'encoding' attribute, but
by default it is None - so a 'hasattr' check for encoding doesn't work
the same.

The fix is quite trivial and I also added a new test to demonstrate the
error - but for the impatient, you can reproduce it via:

import logging
log = logging.getLogger("test")

In all earlier versions of Python, the bytes as specified are written. 
2.6 complains that 'None' is not a valid encoding and fails to write the
Date User Action Args
2008-09-04 03:47:15mhammondsetrecipients: + mhammond, vinay.sajip
2008-09-04 03:47:15mhammondsetmessageid: <>
2008-09-04 03:47:14mhammondlinkissue3772 messages
2008-09-04 03:47:14mhammondcreate