-
Notifications
You must be signed in to change notification settings - Fork 32
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
Read README.rst and HISTORY.rst in UTF-8 #14
Conversation
Since README.rst now contains a snowman character, running setup.py on Python 3 with a locale encoding different than UTF-8 doesn't work anymore. Specify the UTF-8 encoding when reading README.rst and HISTORY.rst in setup.py to fix this issue.
This change is not compatible with Python 2.5, but it looks like rfc3986 doesn't support older than Python 2.6, so it's fine. |
For the background, see: |
I'm not opposed to this change but your description of the reasoning is wrong. This only happens with tox 2.0. If you look at the history of README.rst, that character has been there since the first release. |
Read README.rst and HISTORY.rst in UTF-8
"I'm not opposed to this change but your description of the reasoning is wrong. This only happens with tox 2.0. If you look at the history of README.rst, that character has been there since the first release." I don't know what changed in tox 2.0. Maybe tox 2.0 uses Python 3 instead of Python 2? This issue is specific to Python 3. Anyway, it's now fixed. Thanks :-) |
@Haypo please notice that the bug you linked to in Nova was fixed with https://review.openstack.org/186922. Specifically, note that that has to force |
Try to run setup.py without my change in an environment configured with the C locale, or any locale with an encoding different than UTF-8, you will get the same error. setup.py must work with any locale including the POSIX locale ("C"). I wasn't aware that tox doesn't copy LC_* environment variables anymore. I'm not sure that it's a good idea :-( |
True, but I can't think of a modern operating system that sets the locale to C by default. Even Fedora sets it correctly (if I recall correctly). That aside, I didn't notice it on my phone, but why did you choose the |
I don't like the codecs module :-) https://www.python.org/dev/peps/pep-0400/#motivation |
Good to know. Perhaps someone should publicize the idea of deprecating that since I thought it was a BCP |
Since README.rst now contains a snowman character, running setup.py on
Python 3 with a locale encoding different than UTF-8 doesn't work
anymore.
Specify the UTF-8 encoding when reading README.rst and HISTORY.rst in
setup.py to fix this issue (issue #13).