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: fix Python 3 syntax error in mac_tool.py #30146

Closed
wants to merge 1 commit into from

Conversation

@cclauss
Copy link
Contributor

cclauss commented Oct 27, 2019

Discovered at #30129 (comment)
Confirmed in #30143

  File "./gyp-mac-tool", line 673
    max_value_length = len(max(filelist.items(), key=lambda (k,v):len(v))[1])
                                                            ^
SyntaxError: invalid syntax

https://portingguide.readthedocs.io/en/latest/syntax.html#tuple-unpacking-in-parameter-lists

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
Copy link
Member

bnoordhuis left a comment

You're making several changes. Can you split them into separate commits?

@cclauss cclauss requested a review from targos Oct 27, 2019
@chrmoritz

This comment has been minimized.

Copy link

chrmoritz commented Oct 27, 2019

I think this would still need a backport of nodejs/node-gyp@a48f09b#diff-a486ea7ed25fd07c6c5a3aee31ed8308 to make it fully compatible with Python 3.

@cclauss

This comment has been minimized.

Copy link
Contributor Author

cclauss commented Oct 27, 2019

@chrmoritz nodejs/node-gyp#1937 contains those changes and was already merged.

You need to wait on the second gyp round trip which is blocked until nodejs/node-gyp#1935 lands and then is picked up by npm/cli and then reimported into nodejs/node /tools.

Vendoring in dependencies is awesome. NOT!!

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

cclauss added a commit that referenced this pull request Nov 1, 2019
PR-URL: #30146
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
@cclauss

This comment has been minimized.

Copy link
Contributor Author

cclauss commented Nov 1, 2019

Landed in 9529c66

@cclauss cclauss closed this Nov 1, 2019
@cclauss cclauss deleted the cclauss:fix-tools-mac_tool.py branch Nov 1, 2019
targos added a commit that referenced this pull request Nov 5, 2019
PR-URL: #30146
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
@targos targos mentioned this pull request Nov 5, 2019
targos added a commit that referenced this pull request Nov 8, 2019
PR-URL: #30146
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
targos added a commit that referenced this pull request Nov 10, 2019
PR-URL: #30146
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
targos added a commit that referenced this pull request Nov 10, 2019
PR-URL: #30146
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
targos added a commit that referenced this pull request Nov 11, 2019
PR-URL: #30146
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: David Carlier <devnexen@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.