Skip to content
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

tools: make nodedownload.py Python 3 compatible #29104

Closed
wants to merge 1 commit into from

Conversation

@cclauss
Copy link
Contributor

commented Aug 13, 2019

These changes make nodedownload.py compatible with both Python 2 and Python 3.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
@targos
targos approved these changes Aug 13, 2019
tools/configure.d/nodedownload.py Outdated Show resolved Hide resolved
@lpinca
lpinca approved these changes Aug 13, 2019
@cclauss cclauss referenced this pull request Aug 13, 2019
1 of 4 tasks complete

@sam-github sam-github force-pushed the cclauss:python3-push-again branch from 02cea68 to 7046360 Aug 13, 2019

@nodejs-github-bot

This comment has been minimized.

@sam-github

This comment has been minimized.

Copy link
Member

commented Aug 13, 2019

@cclauss I force-pushed your branch after I squashed the commits and rewrote the commit message to start with tools: .

Also, kicked off a build.

I support fast-tracking this if it is green in CI.

@nodejs-github-bot

This comment has been minimized.

@richardlau

This comment has been minimized.

Copy link
Member

commented Aug 13, 2019

Also, kicked off a build.

I support fast-tracking this if it is green in CI.

No objections to fast tracking but as far as I can remember this file is only used to download ICU which the normal builds don't do (they use the ICU in deps).

@cclauss

This comment has been minimized.

Copy link
Contributor Author

commented Aug 13, 2019

./confugure.py imports this file and seems to use its functions in multiple places.

https://github.com/nodejs/node/search?q=nodedownload&unscoped_q=nodedownload

@sam-github

This comment has been minimized.

Copy link
Member

commented Aug 13, 2019

@nodejs/platform-windows Above CI failure seems irrelevant to this PR, which only changed some python syntax: https://ci.nodejs.org/job/node-test-binary-windows-2/2533/ It looks to be related to temp file cleanup, which I think has an open windows PR somewhere to fix it, but I haven't been able to find it.

@richardlau

This comment has been minimized.

Copy link
Member

commented Aug 13, 2019

./confugure.py imports this file and seems to use its functions in multiple places.

https://github.com/nodejs/node/search?q=nodedownload&unscoped_q=nodedownload

From memory, only on paths where ICU is downloaded (e.g. if deps/icu-small isn't there (it is in the default git clone/source tree) or --download is used with configure).

@sam-github

This comment has been minimized.

Copy link
Member

commented Aug 13, 2019

If its tested and passed, seems OK to fast-track.

If its not covered by the tests... then leaving it not-fasttracked won't make it better :-)

Will a ./configure --download=all be sufficient for a manual test, @richardlau ? I've never used icu, much less built variants of it.

@richardlau

This comment has been minimized.

Copy link
Member

commented Aug 13, 2019

If its tested and passed, seems OK to fast-track.

If its not covered by the tests... then leaving it not-fasttracked won't make it better :-)

😁

Will a ./configure --download=all be sufficient for a manual test, @richardlau ? I've never used icu, much less built variants of it.

./configure --download=all --with-intl=full-icu should work (omitting --with-intl=... defaults to small-icu which uses deps/icu-small if it exists).

With this PR and python2:

bash-4.2$ ./configure --download=all --with-intl=full-icu
 <https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-src.tgz>
 Fetch: . 23.5MB total, 23.5MB downloaded
Checking file integrity with md5:
md5:      a3d18213beec454e3cdec9a3116d6b05  deps/icu4c-64_2-src.tgz
 Extracting tarfile: deps/icu4c-64_2-src.tgz
INFO: Using floating patch "tools/icu/patches/64/source/common/putil.cpp" from "tools/icu"
INFO: Using floating patch "tools/icu/patches/64/source/i18n/dtptngen.cpp" from "tools/icu"
INFO: configure completed successfully
bash-4.2$

So we should be no worse off than we are currently.

@sam-github

This comment has been minimized.

Copy link
Member

commented Aug 13, 2019

OK, well fast-track or not, its all green in CI, 5 approvals, can be landed in 44 hours.

@MattIPv4
Copy link
Contributor

left a comment

lgtm.

@cclauss cclauss referenced this pull request Aug 14, 2019
29 of 41 tasks complete
@Trott
Trott approved these changes Aug 14, 2019
@Trott

This comment has been minimized.

Copy link
Member

commented Aug 14, 2019

It looks to be related to temp file cleanup, which I think has an open windows PR somewhere to fix it

It landed. It's at #28858.

Windows tmpdir cleanup issues have been worked on by @joaocgreis and, before that, @refack.

@sam-github sam-github force-pushed the cclauss:python3-push-again branch from 7046360 to f057611 Aug 14, 2019

@sam-github

This comment has been minimized.

Copy link
Member

commented Aug 14, 2019

I rebased this onto master, and kicked off another ci

@nodejs-github-bot

This comment has been minimized.

@joaocgreis

This comment has been minimized.

Copy link
Member

commented Aug 14, 2019

None of the failures I see there seem to be related to this PR, and the following CI was green so this can land.

The failure in Windows 2008 shows a ENOTEMPTY for a directory that seems empty. I want to investigate things like this, so thanks for mentioning me.

The failures on other Windows versions show a problem with git fetching from the temp repo. Looking at Jenkins timestamps, the git push in the compile job completed before the test jobs started the git fetch, so this might be an issue in Jenkins or Git. We'll have to investigate this if it happens again.

@sam-github

This comment has been minimized.

Copy link
Member

commented Aug 14, 2019

Thanks for the analysis @joaocgreis -- and for the work, @cclauss

Landed in 8ae79c9

@sam-github sam-github closed this Aug 14, 2019

sam-github added a commit that referenced this pull request Aug 14, 2019
tools: make nodedownload.py Python 3 compatible
PR-URL: #29104
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>

@cclauss cclauss deleted the cclauss:python3-push-again branch Aug 14, 2019

targos added a commit that referenced this pull request Aug 19, 2019
tools: make nodedownload.py Python 3 compatible
PR-URL: #29104
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
targos added a commit that referenced this pull request Aug 19, 2019
tools: make nodedownload.py Python 3 compatible
PR-URL: #29104
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@targos targos referenced this pull request Aug 19, 2019
JeniaBR added a commit to JeniaBR/node that referenced this pull request Sep 11, 2019
tools: make nodedownload.py Python 3 compatible
PR-URL: nodejs#29104
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
JeniaBR added a commit to JeniaBR/node that referenced this pull request Sep 11, 2019
tools: make nodedownload.py Python 3 compatible
PR-URL: nodejs#29104
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.