-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
build: compile module was removed in Python 3 #1820
build: compile module was removed in Python 3 #1820
Conversation
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.
LGTM at a quick glance. CI: https://ci.nodejs.org/view/All/job/nodegyp-test-pull-request/143/
Tests still fail with Python 3 with: +gyp: Variable node -e "require('nan')" must expand to a string or list of strings; found a bytes while trying to load binding.gyp
+gyp ERR! configure error
+gyp ERR! stack Error: `gyp` failed with exit code: 1
+gyp ERR! stack at ChildProcess.onCpExit (/home/travis/build/nodejs/node-gyp/lib/configure.js:344:16)
+gyp ERR! stack at ChildProcess.emit (events.js:198:13)
+gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) The error is coming from node-gyp/gyp/pylib/gyp/input.py Lines 947 to 962 in 5bddd22
|
https://travis-ci.com/nodejs/node-gyp/builds/118963575 is a bit opaque to me this time. |
For reference: test/test-find-python.js ............................ 24/26
find python
not ok should be equal
--- wanted
+++ found
+Python 3.7.1
compare: ===
at:
line: 20
column: 9
file: test/test-find-python.js
stack: |
test/test-find-python.js:20:9
source: |
t.strictEqual(stdout, '')
find python
not ok expect truthy value
at:
line: 21
column: 9
file: test/test-find-python.js
stack: |
test/test-find-python.js:21:9
source: |
t.ok(/Python 2/.test(stderr)) also failed in #1815 (https://travis-ci.com/nodejs/node-gyp/jobs/214789663#L4479-L4504) so isn't because of this PR and is unlikely to be because of anything in |
As discussed in nodejs#1811 PR-URL: nodejs#1818 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: João Reis <[email protected]>
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 more of a rubber stamp lgtm than anything
i would like to see those tests cleaned up first though, @joaocgreis they look like they might be coming from your changes?
This reverts commit 2761afb. Building with `-fvisibility=hidden` breaks some of Node's add-on tests and therefore likely also affects third-party add-ons. This change was landed in a patch release so I'm opting to revert it until the next major release. PR-URL: nodejs#1828 Refs: nodejs/node#28647 (comment) Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
PR-URL: nodejs#1820 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Richard Lau <[email protected]>
d685451
to
ef81bdb
Compare
This PR can land, the Python failure is unrelated.
There are still failures in the Windows job that are not related to this. |
You are correct. https://bugs.python.org/issue18338
|
7cdca93
to
ef81bdb
Compare
@cclauss you're good to land and you can do it manually as long as you avoid a merge commit. First I'd recommend changing the commit message because it describes why not what. But your metadata is 👍. Because you're not quite up to date with master, this is what I'd do to get this landed: git checkout master
git pull origin master # replace "origin" with whatever you've called this repo
git checkout compile-module-removed-in-Python3
git rebase master # now up to date with master
git checkout master
git merge compile-module-removed-in-Python3 # should land just one commit onto master, cleanly
git push origin master # replace "origin" appropriately I don't think we can use |
Oh, that I sometimes go a more explicit route when in this kind of situation just to be absolutely clear what I'm trying to achieve: git fetch origin
git checkout origin master
git branch -D master
git checkout -b master but I think |
Make Python 3 compatiblity changes so the code works in both Python 2 and Python 3. Especially, make changes required because the compiler module was removed in Python 3 in favor of the ast module that exists in both Python 2 and Python 3. PR-URL: #1820 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Your metadata didn't make it to
and renamed it to |
I'm not in front of a computer at the moment, but it looks like this landed as a merge commit (both ef81bdb and bacf53d have two parents)? |
Make Python 3 compatiblity changes so the code works in both Python 2 and Python 3. Especially, make changes required because the compiler module was removed in Python 3 in favor of the ast module that exists in both Python 2 and Python 3. PR-URL: #1820 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Richard Lau <[email protected]>
OK, I've fixed it up, reversed to the commit before and cherry-picked ef81bdb onto it then force pushed master. Thanks for picking that up @richardlau! |
Make Python 3 compatiblity changes so the code works in both Python 2 and Python 3. Especially, make changes required because the compiler module was removed in Python 3 in favor of the ast module that exists in both Python 2 and Python 3. PR-URL: #1820 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Refs: nodejs/node-gyp#1820 Refs: nodejs/node-gyp#1843 PR-URL: #29897 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Sam Roberts <[email protected]>
Refs: nodejs/node-gyp#1820 Refs: nodejs/node-gyp#1843 PR-URL: #29897 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Sam Roberts <[email protected]>
Refs: nodejs/node-gyp#1820 Refs: nodejs/node-gyp#1843 PR-URL: #29897 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Sam Roberts <[email protected]>
Refs: nodejs/node-gyp#1820 Refs: nodejs/node-gyp#1843 PR-URL: nodejs#29897 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Sam Roberts <[email protected]> (cherry picked from commit 66b9532)
Checklist
npm install && npm test
passesDescription of change
Our Travis CI ModuleNotFoundError: No module named 'compiler' errors are caused by the fact that the compiler package was removed in Python 3 in favor of the ast module that exists in both Python 2 and Python 3.
These changes are from refack/GYP3@f989ef9
@nodejs/python