-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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: refactor js2c.py for maximal python3 compat #25518
Conversation
This comment has been minimized.
This comment has been minimized.
Fascinating what upstream did... v8/v8@7164251 |
@nodejs/python @nodejs/tooling @nodejs/build PTAL |
Linter errors...
|
1e23681
to
14912d8
Compare
This comment has been minimized.
This comment has been minimized.
@nodejs/python PTAL I've addressed most of the comments, and cleaned this up some more. |
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.
# 2. turn pseudo-booleans strings into Booleans | ||
config = re.sub('"true"', 'true', config) | ||
config = re.sub('"false"', 'false', config) | ||
return config |
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.
# four lines --> one...
# normalize string literals from ' into " and turn pseudo-booleans strings into Booleans
return config.replace('\'', '"').replace('"true"', 'true').replace('"false"', 'false')
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.
Great work!
@nodejs/python @nodejs/build-files PTAL. |
This requires a rebase. |
2c3d1e7
to
2627fea
Compare
This comment has been minimized.
This comment has been minimized.
This looks good to me but my Python expertise is limited. Would much prefer it land with a review from @nodejs/python, but I'll give it a somewhat-rubber stamp LGTM if no one more informed steps in to review/approve/oppose/whatever it. |
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.
* add explicit `--target` argument to enable succinct gyp declaration * simplify js2c semantics PR-URL: nodejs#25518 Reviewed-By: Christian Clauss <[email protected]>
This comment has been minimized.
This comment has been minimized.
* add explicit `--target` argument to enable succinct gyp declaration * simplify js2c semantics PR-URL: #25518 Reviewed-By: Christian Clauss <[email protected]>
This landed as |
@joyeecheung you are right. That was not the intention of this PR and it's probably a rebasing artifact. I intended to move all the one-bye/two-byte changes to #27095 (we're we agreed to shelf that change)... |
Regression fix in #27980 |
make lint-py PYTHON=python2
andmake lint-py PYTHON=python3
/CC @nodejs/python
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes