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

refactor to build on Python 3 #118

Closed
wants to merge 1 commit into from
Closed

Conversation

bjmgeek
Copy link

@bjmgeek bjmgeek commented Dec 12, 2014

for Issue #114

@dsoprea
Copy link
Owner

dsoprea commented Dec 13, 2014

Thank you, very much, for coming up with such a comprehensive PR so quickly. Did you just use 2to3?

  1. I see a large number of print statements that you've unnecessarily wrapped in tuples, which is unnecessary.
  2. We can't just "dismiss" the unsigned literals (e.g. u'xyz'). GD speaks in terms of Unicode, and most of these are in support of that. You're going to have to rewrap those strings back to what they were. Then, we'll need to create a module for backwards-compatible constructs, define a "unicode" function there that has the correct definition whether you're in Python 2 or Python 3, and then go back through all of the instances of u'xyz', and convert them to using our backwards-compatible function.

I recommend that we restore all of the Unicode literals and remove all of the tuples that you added, and we just test and commit the straight-forward conversions (like iteritems() => items(), and xyz.keys() => list(xyz.keys()). Then, we'll work our way through the Unicode stuff (which is high-risk, as one mistake somewhere might cause the exchanges with Google to breakdown.

Thoughts?

@dsoprea
Copy link
Owner

dsoprea commented Dec 22, 2014

It looks like you just used a tool like 2to3, and didn't intend to follow-through on making sure that everything would actually work.

Closing.

@dsoprea dsoprea closed this Dec 22, 2014
@bjmgeek
Copy link
Author

bjmgeek commented Dec 22, 2014

I did just run 2to3 on the code (and fixed a few minor problems). I
confirmed that it built. However, you are correct that I did not follow
through.

On Sun, Dec 21, 2014 at 11:17 PM, Dustin Oprea [email protected]
wrote:

Closed #118 #118.


Reply to this email directly or view it on GitHub
#118 (comment).

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.

2 participants