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

Modernize Python 2 code to get ready for Python 3 #2

Closed
wants to merge 5 commits into from
Closed

Modernize Python 2 code to get ready for Python 3 #2

wants to merge 5 commits into from

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Dec 1, 2018

  • Use print() function in both Python 2 and Python 3
    • print() is a function in Python 3.
  • Old style exceptions --> new style for Python 3
    • Python 3 treats old style exceptions as syntax errors but new style exceptions work as expected in both Python 2 and Python 3.

refack and others added 5 commits November 8, 2018 13:46
Changes the output from '0100' to '1000' and fixes the parsing of `CLTVersion()` output too in case `xcodebuild -version` prints an unexpected output.
* Use __print()__ function in both Python 2 and Python 3
    * __print()__ is a function in Python 3.
* Old style exceptions --> new style for Python 3
    * Python 3 treats old style exceptions as syntax errors but new style exceptions work as expected in both Python 2 and Python 3.
@refack
Copy link
Owner

refack commented Dec 2, 2018

Superseded by 82c2f6e

@refack refack closed this Dec 2, 2018
@refack
Copy link
Owner

refack commented Dec 2, 2018

I backported nodejs/node-gyp#1335, so eh got all those fixes "for free".
I also added Pipfile with a lint script so pipenv run lint passes. Now we need to do some more delicate work.

@cclauss cclauss deleted the modernize-Python-2-codes branch December 2, 2018 23:10
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.

3 participants