Author barry
Recipients barry
Date 2013-01-14.18:24:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1358187846.57.0.700535378161.issue16965@psf.upfronthosting.co.za>
In-reply-to
Content
In this distribute bug I describe a problem when pip installing mimeparse, which has a setup.py with a BOM.  distribute uses execfile() which gets fixed in Python 3 to use a combination of compile(open()) as the fixer.

https://bitbucket.org/tarek/distribute/issue/349/dont-rely-on-2to3-to-properly-rewrite

I think the problem is that the fixer opens the file in text mode, which leaves the BOM as a bogus first character, causing the SyntaxError.  Instead, if the fixer opened the file in binary mode, then the BOM would be handled correctly by compile().
History
Date User Action Args
2013-01-14 18:24:06barrysetrecipients: + barry
2013-01-14 18:24:06barrysetmessageid: <1358187846.57.0.700535378161.issue16965@psf.upfronthosting.co.za>
2013-01-14 18:24:06barrylinkissue16965 messages
2013-01-14 18:24:06barrycreate