tools: python3 compat for inspector code generator#29340
tools: python3 compat for inspector code generator#29340bnoordhuis wants to merge 1 commit intonodejs:masterfrom
Conversation
|
Should we upstream this? |
|
@targos I'm unclear on whether tools/inspector_protocol is an upstream dependency or not. We pull done upstream changes but we also have numerous local changes according to the history. |
|
There's another code generator in |
|
Nice! Elegant. If we are only using one version of code_generator.py then my preference be to leave the other one untouched so that we can keep an accurate track of our real dependencies as discussed at #29196 (comment) |
|
I believe the other one is also used so it's going to need the same fixes. As to why there are two (they're very similar), I don't know. |
|
We seem to have lots of redundant dependencies because we vendor-in and not pip install. Like the conversation at #28555 (comment) |
|
EDIT: Forgive the above... I was mistaken. I did prove that it is the deps file that we want to modify and not the tools file. Thus #29346 |
One of the things #22680 proposed was to remove one of the two copies of the build files for the inspector protocol but it was argued against by the V8 inspector folks. |
|
Both code generators are in use. The changes to the one in deps/ need to be upstreamed first however. |
|
Minor (conventional) preference for async_ instead of _async https://dbader.org/blog/meaning-of-underscores-in-python |
|
I opened https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1781351 upstream. |
cclauss
left a comment
There was a problem hiding this comment.
Please modify this code to be aligned with the changes made in response to comments on https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1781351
f9b635f to
c83ad6b
Compare
|
@cclaus Done. |
The code generator takes a dict and turns it into a namedtuple. The dict contains the key "async", which is a keyword in python 3.7, and rejected by the namedtuple constructor. Rename it to "async_" to avoid the clash. Fixes: nodejs#29326
c83ad6b to
b2d25ce
Compare
cclauss
left a comment
There was a problem hiding this comment.
This looks great and aligns with the changes that have now landed upstream:
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1781351
This file also exists at deps/v8/third_party/inspector_protocol/code_generator.py so we also need to update that file before we can close #29326
Original commit message:
Make code generator python3.7 compatible (async keyword).
Change-Id: Ifcd8b8cb1de60a007c7bbd4564d7869e83cb7109
Fixes: nodejs#29548
Refs:
- nodejs#29548 (comment)
- nodejs#29520
- nodejs#29340
- https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1781351
- https://chromium.googlesource.com/deps/inspector_protocol/+/35c6d4d0d80b42d81bd00bcb1eb2b1093c80ed0a
Original commit message:
Make code generator python3.7 compatible (async keyword).
Change-Id: Ifcd8b8cb1de60a007c7bbd4564d7869e83cb7109
Fixes: #29548
Refs:
- #29548 (comment)
- #29520
- #29340
- https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1781351
- https://chromium.googlesource.com/deps/inspector_protocol/+/35c6d4d0d80b42d81bd00bcb1eb2b1093c80ed0a
PR-URL: #29585
Refs: #29520
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
The code generator takes a dict and turns it into a namedtuple. The dict contains the key "async", which is a keyword in python 3.7, and rejected by the namedtuple constructor. Rename it to "async_" to avoid the clash. Fixes: #29326 PR-URL: #29340 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Original commit message:
Make code generator python3.7 compatible (async keyword).
Change-Id: Ifcd8b8cb1de60a007c7bbd4564d7869e83cb7109
Fixes: #29548
Refs:
- #29548 (comment)
- #29520
- #29340
- https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1781351
- https://chromium.googlesource.com/deps/inspector_protocol/+/35c6d4d0d80b42d81bd00bcb1eb2b1093c80ed0a
PR-URL: #29585
Refs: #29520
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
The code generator takes a dict and turns it into a namedtuple. The dict contains the key "async", which is a keyword in python 3.7, and rejected by the namedtuple constructor. Rename it to "async_" to avoid the clash. Fixes: #29326 PR-URL: #29340 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Original commit message:
Make code generator python3.7 compatible (async keyword).
Change-Id: Ifcd8b8cb1de60a007c7bbd4564d7869e83cb7109
Fixes: #29548
Refs:
- #29548 (comment)
- #29520
- #29340
- https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1781351
- https://chromium.googlesource.com/deps/inspector_protocol/+/35c6d4d0d80b42d81bd00bcb1eb2b1093c80ed0a
PR-URL: #29585
Refs: #29520
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Original commit message:
Make code generator python3.7 compatible (async keyword).
Change-Id: Ifcd8b8cb1de60a007c7bbd4564d7869e83cb7109
Fixes: nodejs#29548
Refs:
- nodejs#29548 (comment)
- nodejs#29520
- nodejs#29340
- https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1781351
- https://chromium.googlesource.com/deps/inspector_protocol/+/35c6d4d0d80b42d81bd00bcb1eb2b1093c80ed0a
PR-URL: nodejs#29585
Refs: nodejs#29520
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Original commit message:
Make code generator python3.7 compatible (async keyword).
Change-Id: Ifcd8b8cb1de60a007c7bbd4564d7869e83cb7109
Fixes: nodejs#29548
Refs:
- nodejs#29548 (comment)
- nodejs#29520
- nodejs#29340
- https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1781351
- https://chromium.googlesource.com/deps/inspector_protocol/+/35c6d4d0d80b42d81bd00bcb1eb2b1093c80ed0a
PR-URL: nodejs#29585
Refs: nodejs#29520
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Original commit message:
Make code generator python3.7 compatible (async keyword).
Change-Id: Ifcd8b8cb1de60a007c7bbd4564d7869e83cb7109
Fixes: #29548
Refs:
- #29548 (comment)
- #29520
- #29340
- https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1781351
- https://chromium.googlesource.com/deps/inspector_protocol/+/35c6d4d0d80b42d81bd00bcb1eb2b1093c80ed0a
PR-URL: #29585
Refs: #29520
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Original commit message:
Make code generator python3.7 compatible (async keyword).
Change-Id: Ifcd8b8cb1de60a007c7bbd4564d7869e83cb7109
Fixes: nodejs#29548
Refs:
- nodejs#29548 (comment)
- nodejs#29520
- nodejs#29340
- https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1781351
- https://chromium.googlesource.com/deps/inspector_protocol/+/35c6d4d0d80b42d81bd00bcb1eb2b1093c80ed0a
PR-URL: nodejs#29585
Refs: nodejs#29520
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Original commit message:
Make code generator python3.7 compatible (async keyword).
Change-Id: Ifcd8b8cb1de60a007c7bbd4564d7869e83cb7109
Fixes: nodejs#29548
Refs:
- nodejs#29548 (comment)
- nodejs#29520
- nodejs#29340
- https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1781351
- https://chromium.googlesource.com/deps/inspector_protocol/+/35c6d4d0d80b42d81bd00bcb1eb2b1093c80ed0a
PR-URL: nodejs#29585
Refs: nodejs#29520
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Original commit message:
Make code generator python3.7 compatible (async keyword).
Change-Id: Ifcd8b8cb1de60a007c7bbd4564d7869e83cb7109
Fixes: nodejs#29548
Refs:
- nodejs#29548 (comment)
- nodejs#29520
- nodejs#29340
- https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1781351
- https://chromium.googlesource.com/deps/inspector_protocol/+/35c6d4d0d80b42d81bd00bcb1eb2b1093c80ed0a
PR-URL: nodejs#29585
Refs: nodejs#29520
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Original commit message:
Make code generator python3.7 compatible (async keyword).
Change-Id: Ifcd8b8cb1de60a007c7bbd4564d7869e83cb7109
Fixes: #29548
Refs:
- #29548 (comment)
- #29520
- #29340
- https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1781351
- https://chromium.googlesource.com/deps/inspector_protocol/+/35c6d4d0d80b42d81bd00bcb1eb2b1093c80ed0a
Backport-PR-URL: #30109
PR-URL: #29585
Refs: #29520
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Original commit message:
Make code generator python3.7 compatible (async keyword).
Change-Id: Ifcd8b8cb1de60a007c7bbd4564d7869e83cb7109
Fixes: #29548
Refs:
- #29548 (comment)
- #29520
- #29340
- https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1781351
- https://chromium.googlesource.com/deps/inspector_protocol/+/35c6d4d0d80b42d81bd00bcb1eb2b1093c80ed0a
Backport-PR-URL: #30109
PR-URL: #29585
Refs: #29520
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
The code generator takes a dict and turns it into a namedtuple. The dict
contains the key "async", which is a keyword in python 3, and rejected
by the namedtuple constructor. Rename it to "_async" to avoid the clash.