-
Notifications
You must be signed in to change notification settings - Fork 180
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
Fix encoding bugs in Python2 (non-ASCII characters) #80
Conversation
Updating README to include information for installing from pip
Releasing 0.2 to master
CLANotRequired
Release 0.3
Hi @MiguelSR - Thank you so much for finding and fixing this issue! I'm going to spend some time today to write a test case that exercises this for py2 and py3. In order to be able to accept the PR, we do need you to sign our contributor license agreement which is available on tableau.github.io and can be signed electronically by emailing the address listed there. Also, do you mind rebasing this PR against the development branch? We keep master equal to our latest released version, and we only release a version every month, so this would need to live in development until we release the next version at the end of September. |
if sys.version_info[0] == 2: | ||
description_string = description_string.decode('utf-8') | ||
|
||
return u'{}'.format(description_string) # This is necessary for py3 support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be done with a typecheck instead?
if isinstance(description_string, bytes):
description_string = description_string.decode('utf-8')
return description_string
Then I believe the u'{}' format dance isn't necessary
(And we don't have to import sys and do the version check)
If we must do a version check, can you put it at the top
PY2 = sys.version_info[0] == 2
...
if PY2:
<format dance>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello.
Yes it makes sense to check the type instead of the Python version.
I'll sign later the CLA, do the rebase and fix the commit to get rid of sys.
Thanks,
Miguel.
@MiguelSR -- Wanted to ping you and see if you were still interested in submitting a patch? (We love having more contributors, let us know if you need anything) |
Yes sure, I was waiting for the cla, which was sent to me today :) El 15 sept. 2016 22:26, "Tyler Doyle" [email protected] escribió:
|
Thank you so much @MiguelSR! |
Thank you :) El 19 sept. 2016 17:59, "Russell Hay" [email protected] escribió:
|
Fix bugs in Python2 when column name has non-ascii characters and when Field description has non-ascii characters.