-
Notifications
You must be signed in to change notification settings - Fork 16.2k
fix: use print() function in both Python 2 and Python 3 #18395
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
Conversation
💖 Thanks for opening this pull request! 💖 We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of commit messages with semantic prefixes:
Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
8d7fe1a
to
80a3288
Compare
I'm all for switching to Py3 but we very heavily depend on Py2 currently because Chromium's build scripts are all Py2. Are you aware of any efforts in Chromium to upgrade to 3? |
@@ -4,6 +4,7 @@ | |||
# found in the LICENSE file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we use this any more either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this gets used by pkg-config-wrapper
, which i believe we still use to wrap around pkg-config
to generate the correct include and library paths when cross-compiling using a sysroot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find any reference to this script, can you link me to where it's used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @deepak1556 i think you may know more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a pre GN thing, not needed anymore. https://github.com/electron/electron/blob/3-0-x/toolchain.gypi#L80
80a3288
to
dcb6beb
Compare
@nornagon None of these changes break Python 2 compatibility. There has been a lot of movement towards Python 3 compatibility in the Chromium codebase in recent months. Please check it if you get a chance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet. This looks good to me then!
notes: Removed a series of Python 3 syntax errors
dcb6beb
to
454644d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for writing this, @cclauss!
Am I correct in assuming that the build-mac failure is unrelated? |
@cclauss can you resolve the merge conflicts? once that's done we can get this merged! |
Release Notes Persisted
|
Congrats on merging your first pull request! 🎉🎉🎉 |
Description of Change
notes: Fix issues that will halt the runtime on modern Python.
Legacy print statements are syntax errors in Python 3 but print() function works as expected in both Python 2 and Python 3.
Old style exceptions are syntax errors in Python 3 but new style exceptions work as expected in both Python 2 and Python 3.
225 days until Python 2 end of life.
Checklist
npm test
passesRelease Notes
Notes: