gyp: cherrypick python3 changes to input.py from node-gyp#29140
gyp: cherrypick python3 changes to input.py from node-gyp#29140cclauss wants to merge 1 commit intonodejs:masterfrom
Conversation
b3e2b29 to
b601fe0
Compare
|
I doubt this will pass ci's linter check on the commit messages, the 2 last commits should be squashed into the first --- I'd do it, but @cclauss your branch is protected, you'll have to unprotect it, or do the squashing yourself, or perhaps it can be done on landing if ci is green, I'm not sure if we do that. |
b601fe0 to
83df0d2
Compare
83df0d2 to
227fbee
Compare
227fbee to
4c7eae1
Compare
4c7eae1 to
f6885f4
Compare
|
What's the best way to land this? Squash everything into a single commit? |
+1 to squash the commit. |
|
I usually squash like this combined with a well timed git rebase -i master. However that creates merge commits and requires force push which does not work for this community. Can someone point me to the handful of commands that would allow me to squash without causing rework? A pointer here or I am @cclauss on Slack. |
|
@cclauss |
tools/gyp/pylib/gyp/input.py
Outdated
There was a problem hiding this comment.
The Python Software Foundation is going in the opposite direction so the muscle memory is building up but will fix.
tools/gyp/pylib/gyp/input.py
Outdated
There was a problem hiding this comment.
I suppose this might cause a runtime exception when the output contains e.g. latin1-encoded file paths?
There was a problem hiding this comment.
You are correct. There is the old adage that you can never accurately guess encodings -- you have to be told. Should we leave as is or how should we resolve? We could catch the UnicodeDecodeError and then attempt to return s.decode('latin-1') and if we catch another UnicodeDecodeError just return s. Other approaches?
There was a problem hiding this comment.
That sounds reasonable, that probably covers 99% of everyday use.
f6885f4 to
bbde699
Compare
|
Landed in 3b92998 |
PR-URL: #29140 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: #29140 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: nodejs#29140 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> (cherry picked from commit 3b92998)
Built on the lessons learned in #29130 if we bring all changes done to this file in node-gyp, that breaks our Travis CI tests so this PR cherrypicks only the Python 3 compatibility changes. These changes are somewhat complex because the complier module was removed in Python 3 in favor of ast which was introduced in Python 2.5.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes