Author belopolsky
Recipients belopolsky, doerwalter, ncoghlan, pitrou, vstinner
Date 2010-11-06.04:09:53
SpamBayes Score 9.1739e-10
Marked as misclassified No
Message-id <1289016600.21.0.75147972422.issue10329@psf.upfronthosting.co.za>
In-reply-to
Content
Attached patch, issue10329.diff fixes the issue by setting the encoding of the coverage file to that of the source file.  I am not 100% happy with this patch for the following reasons:

1. It opens the source file one more time.  This is probably acceptable because existing code already opens it at least four times when -m (show missing) option is selected.  (Twice in find_executable_linenos() and twice in linecache.getlines().  Fixing that would require refactoring of linecache code.

2. This will not work for source code not stored in a file, but provided by a __loader__.get_source() method.  However it looks like trace will not work at all in this case, so fixing that is a separate issue.
History
Date User Action Args
2010-11-06 04:10:00belopolskysetrecipients: + belopolsky, doerwalter, ncoghlan, pitrou, vstinner
2010-11-06 04:10:00belopolskysetmessageid: <1289016600.21.0.75147972422.issue10329@psf.upfronthosting.co.za>
2010-11-06 04:09:55belopolskylinkissue10329 messages
2010-11-06 04:09:54belopolskycreate