Skip to content

Conversation

@Fematich
Copy link
Contributor

This pull request prepares the unpackaged files for Python 3 support. This PR is part of a series in which all subpackages will be updated using the same approach.
This approach has been documented here and the first pull request in the series (Futurize coders subpackage) demonstrating this approach can be found at #5053.

R: @aaltay @tvalentyn @RobbeSneyders


def __init__(self, tag, value):
if not isinstance(tag, string_types):
if not isinstance(tag, (bytes, unicode)):
Copy link
Contributor

@RobbeSneyders RobbeSneyders May 16, 2018

Choose a reason for hiding this comment

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

six.string_types is equivalent to (str, unicode).
See https://pythonhosted.org/six/#six.string_types
On Python 2, bytes is an alias for str, but on Python 3 this will behave differently.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

@RobbeSneyders
Copy link
Contributor

LGTM, Thank you!

Copy link
Contributor

@tvalentyn tvalentyn left a comment

Choose a reason for hiding this comment

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

LGTM, thank you, @Fematich.

@tvalentyn
Copy link
Contributor

Could you please resolve the merge conflicts?

@aaltay
Copy link
Member

aaltay commented Jun 13, 2018

Merged and resolved conflict at merge time. Commits:
ce07fbf
d2ea77f

@aaltay aaltay closed this Jun 13, 2018
@Fematich
Copy link
Contributor Author

run python precommit

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.

4 participants