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

[WIP] Fix encoding of setup.py for non-ascii names #2639

Merged
merged 2 commits into from Sep 22, 2015

Conversation

rossjones
Copy link
Contributor

Sets the default-encoding so that what the user enters is utf8 and
this stops the paster templates for exploding. Also sets the encoding
on the setup.py template so that it can be run if it has utf8 chars in it

This should fix #2636

Sets the default-encoding so that what the user enters is utf8 and
this stops the paster templates for exploding.  Also sets the encoding
on the setup.py template so that it can be run if it has utf8 chars in it

This should fix #2636
@@ -51,6 +51,9 @@ class CkanextTemplate(Template):
def check_vars(self, vars, cmd):
vars = Template.check_vars(self, vars, cmd)

reload(sys)
sys.setdefaultencoding('utf-8')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yikes, this could have really surprising side effects. I think we should fix our bytes/unicode confusion issues where they lie instead of with a global flag like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's inside paster

@rossjones rossjones changed the title Fix encoding of setup.py for non-ascii names [WIP] Fix encoding of setup.py for non-ascii names Sep 15, 2015
@wardi wardi self-assigned this Sep 22, 2015
@wardi wardi merged commit 6296d88 into master Sep 22, 2015
@smotornyuk smotornyuk deleted the 2636-fix-encoding-create-ext branch December 19, 2018 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unicode decode error when creating an extension
2 participants