Merged
Conversation
emosesPatreon
suggested changes
May 16, 2018
| @@ -1,5 +1,6 @@ | |||
| # 0.5.0 | |||
Contributor
There was a problem hiding this comment.
Leave 0.5.0 in place, and add 0.5.1 above it.
Here's an example: https://github.com/Patreon/patreon-js/blob/master/changelog.md
patreon/api_spec.py
Outdated
|
|
||
| def api_url(*segments, **query): | ||
| path = '/'.join(map(str, segments)) | ||
| path = six.text_type('/').join(map(six.text_type, segments)) |
Contributor
There was a problem hiding this comment.
What exactly does this do? I was looking at the docs for six, and it just shows text_type as a constant, not a function.
Contributor
Author
There was a problem hiding this comment.
It converts the text into unicode string for python two and str for python3
Eg:
In python two :
x = six.text_type('hello')
x
u'hello'
In python three:
x = six.text_type('hello')
x
'hello'
Contributor
|
K. I think you don't need it to add it everywhere in the tests. It's
actually probably a good idea to *not* add it everywhere in the tests,
because consumers will *not* be using it. Instead, make sure it's
everywhere it needs to be in the code, and run the tests in both 2.x and
3.x. Let me know if you need help with pyenv and virutalenv to set up
different execution environments.
…On Wed, May 16, 2018 at 4:37 PM, Lynnea Tan ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In patreon/api_spec.py
<#22 (comment)>:
> @@ -23,7 +25,7 @@
def api_url(*segments, **query):
- path = '/'.join(map(str, segments))
+ path = six.text_type('/').join(map(six.text_type, segments))
It converts the text into unicode string for python two and str for python3
Eg:
In python two :
x = six.text_type('hello')
x
u'hello'
In python three:
x = six.text_type('hello')
x
'hello'
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Ak6MKd9CqR8mqfZZigc1bMUvnZl7l4Ayks5tzLgdgaJpZM4UB5j3>
.
--
Evan Moses
emoses@patreon.com
|
emosesPatreon
approved these changes
May 17, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add six module, update version and imports