You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee=Noneclosed_at=<Date2018-10-16.05:47:18.516>created_at=<Date2013-01-14.18:24:06.537>labels= ['3.8', 'type-bug', 'expert-2to3']
title="2to3 should rewrite execfile() to open in 'rb' mode"updated_at=<Date2018-10-16.05:47:18.515>user='https://github.com/warsaw'
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.
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().