Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Respect explicit encoding declarations in setup.py files. #816

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

bdarnell commented Feb 24, 2013

In Python 2, the exec statement handles encoding for us, but in
Python 3 the encoding must be specified when opening the file
(if it's not specified it uses the system locale encoding, so
previously this would work only if your locale environment variables
specified the same encoding as the setup.py file).

On Python 3.2+ the tokenize.open function is available to interpret
the encoding declaration; fixing this for python 3.0 and 3.1 is more
difficult.

Member

ncoghlan commented Nov 22, 2013

This should resolve a problem incorrectly reported against CPython: http://bugs.python.org/issue19685

@dstufft, @qwcode, this would be a good one to sneak into 1.5 if we can, but 1.5.1 would be fine, too :)

Owner

dstufft commented Nov 22, 2013

@bdarnell Can you rebase this against develop?

@bdarnell bdarnell Respect explicit encoding declarations in setup.py files.
In Python 2, the exec statement handles encoding for us, but in
Python 3 the encoding must be specified when opening the file
(if it's not specified it uses the system locale encoding, so
previously this would work only if your locale environment variables
specified the same encoding as the setup.py file).

On Python 3.2+ the tokenize.open function is available to interpret
the encoding declaration; fixing this for python 3.0 and 3.1 is more
difficult.
8c21e1c
Contributor

bdarnell commented Dec 1, 2013

OK, it's rebased against the current develop branch now.

Member

ncoghlan commented Dec 13, 2013

@dstufft @qwcode It would be good to get this into 1.5, so it goes into CPython 3.4

Owner

dstufft commented Dec 20, 2013

Fixed in #1394

@dstufft dstufft closed this Dec 20, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment