-
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
Accept Python 3 by default #1844
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.
Awesome work here!
Can you please add a Python 3 on macOS on Travis CI test like #1846 just to make sure that is passing?
This is blocked by #1846, we can't land this with OSX failing. |
seems good to me but I'm confused on whether the macos problems block this and #1843 or if they can land independently of that? |
We can land this with the macOS tests still running in allow_failures mode. Our README clearly states that Python 3 is not supported which aligns with Travis CI's intent for allow_failures
|
#1843 has landed. In there, node-gyp only uses Python 3 if This PR removes that flag, making node-gyp accept Python 3. So, if a release is shipped with this PR, node-gyp will start using Python 3 in the users computers, and any issue we have will manifest there. Currently, we know Python 3 is failing on osx, so shipping a release with this would break node-gyp on every osx machine that has Python 3 installed. We know that our tests pass with Python 3 on Windows and Linux, but our tests don't have a good coverage of gyp. It's likely that there are modules out there that use parts of gyp that we don't test here, and those would be broken as well. GYP3 could help a lot with this. So, we can't land this PR until all failures that we know of are fixed. |
9be02bc
to
9318e21
Compare
9318e21
to
b154b07
Compare
nodejs/node#29246 bumped into this. I'm not sure what the plan is. If I'm missing the conversation elsewhere, pls point me there! I don't want to fragment an existing conversation. node's tests can't pass on a py3-only machine until npm has a copy of node-gyp that supports py3. Does npm even get node-gyp from this repo? :-( Sorry, you can see how late to this "party" I'm arriving. |
Yes. :-) |
@sam-github my comment above is still a valid summary of the current situation. Going forward, I believe the options on the table are either to use GYP3 (#1845) or fix the osx issues (@cclauss might be working on that). This PR is ready to be rebased and land landed when we believe Python 3 support to be ready. However, this PR does not change any Python code, it only removes the block to run on Python 3. |
b154b07
to
f7a28c3
Compare
Rebased to make Travis run again, but it's still red. Current status: #1844 (comment) and #1844 (comment) |
The macOS error looks related to #1854 so I will attack it... Fixed in Decode stdout on Python 3 #1890 |
Please rebase again to resolve conflict and ensure macOS now passes. |
Once this PR lands, does NODE_GYP_FORCE_PYTHON=python3 still have to be set to use Py3?
|
f7a28c3
to
a490ca5
Compare
a490ca5
to
1276037
Compare
1276037
to
3066b03
Compare
0ffb1aa
to
167b563
Compare
167b563
to
05138c8
Compare
Doesn't "have" to, but I'd rather keep it in most (if not all) of the entries in Travis, since not having it was the reason we didn't know what Python was actually being run before. This is a good way to avoid surprises.
Without |
PR-URL: #1844 Reviewed-By: Christian Clauss <cclauss@me.com>
Hit an issue because of isaacs/minizlib#9 - Travis kept 1.3.1 in cache. Should be fixed now, forced update in one run and Travis updated the cache. CI: https://ci.nodejs.org/view/All/job/nodegyp-test-pull-request/155/ ✔️ Landed in 3d1c60a |
Does this change which version of python is chosen? I can't tell from the diff. I.e
I don't have any concerns either way, but I think we should call out in the docs/changelog if the order of choice changed, right now it just says Python 3 is accepted, not under which conditions is preferred, if ever. |
I take that to mean python will be used. |
@joaocgreis Can I edit this description? I think that isn't quite accurate, it should be
Personally, I suggest that this PR can and should land on 5.x, with the minor tweek of moving cf #1892 (comment) and previous discussion |
Python 3 is allowed as a compatible Python, but its looked for after Python 2. rvagg: removed additional EXPERIMENTAL_NODE_GYP_PYTHON3 in .travis.yml from a previous commit while landing. Backport-of: #1844 PR-URL: #1910 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: João Reis <reis@janeasystems.com>
Python 3 is allowed as a compatible Python, but its looked for after Python 2. rvagg: removed additional EXPERIMENTAL_NODE_GYP_PYTHON3 in .travis.yml from a previous commit while landing. Backport-of: #1844 PR-URL: #1910 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: João Reis <reis@janeasystems.com>
Checklist
npm install && npm test
passesDescription of change
This depends on #1843, I will rebase when that PR lands. Only a971947 needs to be reviewed here.This makes node-gyp accept Python 3 as compatible without needing
EXPERIMENTAL_NODE_GYP_PYTHON3
in the environment. It also looks forpython
,python3
, thenpython2
(in that order). Note thatpython
is usually Python 2.@nodejs/node-gyp please not that we cover little more than a basic hello world in our tests, there are probably parts of Gyp that are not covered and are not compatible with Python 3. We will have to be extra careful shipping the node-gyp version that includes this.