Skip to content
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

index.txt, news.txt and __init__.py are UTF-8 (see #761) #762

Closed
wants to merge 1 commit into from

Conversation

kmike
Copy link

@kmike kmike commented Jan 3, 2013

this is needed to use "LC_ALL=C" in py32 tox testing. see #761 for details.

@kmike
Copy link
Author

kmike commented Jan 3, 2013

It seems that the build fails because unicode metadata is not supported by distutils under Python 2.x. In my own packages I usually encode metadata to utf8 under Python 2.x (that's an encoding http://pypi.python.org/pypi uses). Should pip do the same?

@qwcode
Copy link
Contributor

qwcode commented Jan 4, 2013

the failure is only in 2.5. encode the long_description back down to utf-8, and you'll get a clean travis build I think.

long_description = (parts[0] + long_description + parts[2] +
"\n\n" + read("docs", "news.txt")).encode('utf-8')

@kmike
Copy link
Author

kmike commented Jan 4, 2013

I believe binary long_description would be incorrect in Python 3.x

@qwcode
Copy link
Contributor

qwcode commented Jan 4, 2013

ok, it fails in python3.
what do you mean exactly by "In my own packages I usually encode metadata to utf8 under Python 2.x"
a conditional in setup.py?

@kmike
Copy link
Author

kmike commented Jan 4, 2013

Yes, I think there should be a conditional in pip's setup.py.

utf8-encoded long_description is not without issues though: for example, setup.py register fails with it because distutils tries to check the markup using docutils and this fails with UnicodeDecodeError ( http://bugs.python.org/issue13114 ). I don't think this would be an issue for end-users of pip.

@hltbra
Copy link
Contributor

hltbra commented Mar 28, 2013

Should we close this pull request because of pypa/virtualenv#201 (comment) and commit 1656ac3?

@kmike
Copy link
Author

kmike commented Mar 28, 2013

Yes, decoding from utf8 is pointless given that files are ascii now; also, decoding from utf8 was not enough to fix non-ascii issues.

@kmike kmike closed this Mar 28, 2013
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants