Uh oh!
There was an error while loading. Please reload this page.
Accept Python 3 by default - #1844
Conversation
joaocgreis
commented
Jul 23, 2019
Uh oh!
There was an error while loading. Please reload this page.
joaocgreis
commented
Jul 24, 2019
joaocgreis
commented
Jul 24, 2019
This is blocked by #1846, we can't land this with OSX failing. |
rvagg
commented
Jul 26, 2019
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? |
cclauss
commented
Jul 26, 2019
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
|
joaocgreis
commented
Jul 26, 2019
#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
9318e21Compare9318e21 to
b154b07Comparesam-github
commented
Sep 6, 2019
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. |
bnoordhuis
commented
Sep 6, 2019
Yes. :-) |
joaocgreis
commented
Sep 10, 2019
@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
f7a28c3Comparejoaocgreis
commented
Sep 25, 2019
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
a490ca5Comparea490ca5 to
1276037Compare1276037 to
3066b03Compare0ffb1aa to
167b563Compare167b563 to
05138c8Comparejoaocgreis
commented
Sep 30, 2019
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>
joaocgreis
commented
Sep 30, 2019
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 |
sam-github
commented
Oct 2, 2019
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. |
cclauss
commented
Oct 2, 2019
I take that to mean python will be used. |
sam-github
commented
Oct 3, 2019
@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 testpassesDescription 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_PYTHON3in the environment. It also looks forpython,python3, thenpython2(in that order). Note thatpythonis 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.