Uh oh!
There was an error while loading. Please reload this page.
build: replace optparse for argparse in configure.py - #29814
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Issue #29813 suggested migrating from optparse to argparse as optparse is deprecated. This commit does the changes necessary to this migration, as suggested in https://docs.python.org/3/library/argparse.html#module-argparse Most of the work was done in PR #26725Fixes: #29813
richardlau
commented
Oct 2, 2019
Probably needs someone more familiar with Python (cc @nodejs/python) but with |
cclauss
commented
Oct 2, 2019
My method of approaching this would be a separate repo to prove it all out. I would have one file that would be all the optparse stuff with as minimal changes as possible. I would have a second file that was my proposed solution using argparse. Each file would take in commandline args and print out the parsed args. Then I would have a test runner (Travis CI, GitHub Actions, CircleCI, etc.) and I would run the same set of inputs through both and see if the outputs matched. Does that make sense? |
cclauss
commented
Oct 2, 2019
As discussed at https://docs.python.org/2/library/argparse.html#argparse.Namespace try vars(args) to get a sense of what is inside. |
vccolombo
commented
Oct 3, 2019
Thank you very much for your help. I need some time to try it and I'll come back after that |
vccolombo
commented
Oct 14, 2019
Hello there. Really sorry for the delay. I got stuck with some stuff from college. I may need a couple of weeks to deliver something here. But I still want to work on and finish this. Hope you understand Thanks! |
cclauss
commented
Oct 15, 2019
No rush on this one given that both Python 3.8 (released yesterday) and 3.9 (1+ years away) support the deprecated module. If you are not warped up in one month then I will take a whack at it. |
BridgeAR
commented
Jan 12, 2020
Ping @vccolombo@cclauss |
vccolombo
commented
Jan 12, 2020
Hi! I wasn't able to finish it, sorry about that. I though it would be easier when I saw the Issue, and now I'm on a new job so it's even harder to find time to tackle it. Really sorry again. Thank you for your time |
BridgeAR
commented
Jan 12, 2020
@vccolombo thank you for the work! |
Refs: nodejs#26725Fixes: nodejs#29813 Refs: nodejs#29814 PR-URL: nodejs#35755 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Christian Clauss <cclauss@me.com>
Hello! I saw Issue #29813 and decided to take the challenge as my first commit to Node.
However while looking on what was done in PR #26725 I got confused about what is gyp_args and what that PR changed about it.
Currently, my PR fails when running
gyp_args += argswith errorTypeError: 'Namespace' object is not iterableCan anyone give me some help about this?
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes