Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign uptools: Use print() function on both Python 2 and 3 #24486
Conversation
nodejs-github-bot
added
build
intl
test
tools
labels
Nov 19, 2018
This comment has been minimized.
This comment has been minimized.
|
Is there any chance of the GYP patches being upstreamed? If not, it would be great to finally do the thing where we pull changes from our own fork of it… |
This comment has been minimized.
This comment has been minimized.
|
@addaleax Working on that in parallel. It would be a lot easier is we pip installed our Python dependencies instead of vendoring them in. |
cclauss
force-pushed the
cclauss:tools-print-function
branch
from
6651436
to
d0b33fb
Nov 19, 2018
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@cclauss thank you for making it easier to review. |
refack
added
the
python
label
Nov 19, 2018
|
Should exclude |
This comment has been minimized.
This comment has been minimized.
|
P.S. I'm self-assigned this so I'll get notifications from Github, and so that I will not lose track of it and help steward it to completion. |
refack
self-assigned this
Nov 19, 2018
cclauss
force-pushed the
cclauss:tools-print-function
branch
from
d0b33fb
to
4021ecd
Nov 19, 2018
| @@ -1,3 +1,4 @@ | |||
| from __future__ import print_function | |||
This comment has been minimized.
This comment has been minimized.
thefourtheye
Nov 20, 2018
Contributor
Nit: This would be better if it followed the copyright notice.
This comment has been minimized.
This comment has been minimized.
refack
Nov 20, 2018
Member
This isn't our code. It should be patched upstream at https://chromium.googlesource.com/deps/inspector_protocol/
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cclauss
Nov 20, 2018
Author
Contributor
I will remove inspector_protocol from this PR.
However this opens up a can of worms that I do not have a solution for. Chromium in general and v8 specifically are not on GitHub. Their GitHub mirror does not accept pull requests. The v8 repo is just 1.4% Python but that is all legacy Python and at least 76 files need to be modified just to fix the print statement which is merely the start of a Python 3 port. v8 is a venerable codebase and I often hear that it was a godsend to the JavaScript community but its Python code needs to be modernized, removed, or replaced with JavaScript, Go, etc. 407 days until Python 2 end of life. @hugovk your expert advise here please.
This comment has been minimized.
This comment has been minimized.
refack
Nov 20, 2018
Member
So they do accept PRs (which they call CLs) you just need to do it their way:
https://v8.dev/docs/contribute
As for inspector_protocol it's a sub project so submitting patches should be simpler.
/cc @aslushnikov @ak239
This comment has been minimized.
This comment has been minimized.
aslushnikov
Nov 26, 2018
Contributor
As for inspector_protocol it's a sub project so submitting patches should be simpler.
It's quite similar for both v8 and inspector-protocol.
For the inspector-protocol, check out these links:
This comment has been minimized.
This comment has been minimized.
|
@srl295 where do the python scripts in |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@cclauss from the Node.js perspective, IMHO our first goal is to get the main build@test (a.k.a CI) workflow compatible with python3. |
This comment has been minimized.
This comment has been minimized.
|
Sounds like a good plan. |
refack
added
the
fast-track
label
Nov 20, 2018
This comment has been minimized.
This comment has been minimized.
|
CI: https://ci.nodejs.org/job/node-test-pull-request/18805/ Reviewers please consider this for fast-tracking by |
This comment has been minimized.
This comment has been minimized.
refack
removed
the
fast-track
label
Nov 20, 2018
This comment has been minimized.
This comment has been minimized.
ack. |
This comment has been minimized.
This comment has been minimized.
|
Should I break this into seven separate PRs to make it easier to review? |
cclauss
deleted the
cclauss:tools-print-function
branch
Nov 26, 2018
This comment has been minimized.
This comment has been minimized.
|
@refack sorry :( yes, they are 'our own'. I wrote them origianlly to be part of ICU, but the python scripts should be considered part of node. Incidentally, ICU itself will require python for build-from-repo (not from tarball). At this point it will require python 2.7 or 3. |
|
I really thought I +1'ed a similar change here. but anyway, post merge LGTM. There's no need to upstream ICU's .py files at this point. |
This comment has been minimized.
This comment has been minimized.
|
@srl295 Thanks for confirming |
This comment has been minimized.
This comment has been minimized.
|
But on this point ICU as of 2 days ago does actually have its own slicer— please see #25136 and comment on the upstream design. This would replace node's special code (and it runs on python 2.7 and 3). |
cclauss commentedNov 19, 2018
•
edited by addaleax
A subset of #23669 to simplify the review process. @refack @addaleax
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes