GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||
GeezerVison is showing github.com — Fix encoding bugs in Python2 (non-ASCII characters) by MiguelSR · Pull Request #80 · tableau/document-api-python Conversation
|
|
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| 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.
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>
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@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) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
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ó:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@MiguelSR thanks for your patience while we got the CLA sent out. You are good to go now. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you so much @MiguelSR! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you :) El 19 sept. 2016 17:59, "Russell Hay" [email protected] escribió:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.