-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use UTF-8 to write sitecustomize.py #9136
Conversation
Fixes #9135 |
Failing at the moment, because Python 2 Let's leave this till we remove Python 2 tests. |
|
Yeah, probably. But I don't see the point if we're likely to rip it out in a couple of months. I'm happy if someone else wants to make this Python 2 compatible, though. |
How do you feel about waiting a couple of weeks, and then we'll revisit this, because master won't be Python 2? |
This is also related to #9054 (which I believe would also be resolved by this fix). OTOH I really would like this to be fixed for Python 3 before we drop Python 2, otherwise there would be no migration path available for people stuck on Python 2 due to this issue (may be a hypothetical problem at this point though). Maybe we can do something like if six.PY2:
f = open(...)
else:
f = open(..., encoding="utf8")
with f:
f.write(...) |
@uranusjr I have no objection if you want to make a version of this fix that supports Python 2, but I don't expect to do so myself. |
Ah yes, I knew I remembered this issue having come up recently, but I couldn't find it. Thanks for the link. |
Was there a reason this was closed? The issue still seems to be present. |
IIRC this was abandoned because Python 2 was too difficult to handle. Since that is no longer an issue, feel free to submit a new PR. |
No description provided.