| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Please replace the filter() calls with list comprehensions as discussed at https://docs.python.org/3.0/library/functions.html#filter
Sorry, something went wrong.
There was a problem hiding this comment.
What does this do? How do I test it? AFAICT, python3 doesn't run on configure.py before or after this PR:
w/node (master $ u=) % python3 configure.py --ninja
Traceback (most recent call last):
File "configure.py", line 28, in <module>
from gyp.common import GetFlavor
File "tools/gyp/pylib/gyp/__init__.py", line 37
print '%s:%s:%d:%s %s' % (mode.upper(), os.path.basename(ctx[0]),
^
SyntaxError: invalid syntax
w/node (master $ u=) % git pr 29416 upstream
remote: Enumerating objects: 3044, done.
remote: Counting objects: 100% (3044/3044), done.
remote: Total 4164 (delta 3044), reused 3044 (delta 3044), pack-reused 1120
Receiving objects: 100% (4164/4164), 4.95 MiB | 4.01 MiB/s, done.
Resolving deltas: 100% (3346/3346), completed with 2070 local objects.
From github.com:nodejs/node
* [new ref] refs/pull/29416/head -> upstream/pr/29416
w/node (master $ u=) % python3 configure.py --ninja
Traceback (most recent call last):
File "configure.py", line 28, in <module>
from gyp.common import GetFlavor
File "tools/gyp/pylib/gyp/__init__.py", line 37
print '%s:%s:%d:%s %s' % (mode.upper(), os.path.basename(ctx[0]),
^
SyntaxError: invalid syntax
Sorry, something went wrong.
Sorry, something went wrong.
I'm sure @targos and/or @cclauss will have better answers, but my approval is based on the fact that filter() returns different things in Python 2 vs. Python 3 (list vs. generator) so for compatibility purposes, best to refactor it out. |
Sorry, something went wrong.
|
This fixes python3 configure.py --ninja on my end. I don't have the invalid syntax like you @sam-github. |
Sorry, something went wrong.
Python 3.6 vs Python 3.7 maybe? |
Sorry, something went wrong.
|
I'm on python 3.7.4, which versions are you all using? w/node (upstream/pr/29416 $) % git co upstream/pr/29416; git log --oneline | head -n 1; python3 --version; python3 configure.py --ninja
Already on 'upstream/pr/29416'
3b2ed104b7 fixup! tools: fix GYP ninja generator for Python 3
Python 3.7.4
INFO: Using floating patch "tools/icu/patches/64/source/common/putil.cpp" from "tools/icu"
INFO: Using floating patch "tools/icu/patches/64/source/i18n/dtptngen.cpp" from "tools/icu"
Traceback (most recent call last):
File "configure.py", line 1716, in <module>
run_gyp(gyp_args)
File "tools/gyp_node.py", line 54, in run_gyp
rc = gyp.main(args)
File "tools/gyp/pylib/gyp/__init__.py", line 547, in main
return gyp_main(args)
File "tools/gyp/pylib/gyp/__init__.py", line 523, in gyp_main
options.duplicate_basename_check)
File "tools/gyp/pylib/gyp/__init__.py", line 139, in Load
params['parallel'], params['root_targets'])
File "tools/gyp/pylib/gyp/input.py", line 2779, in Load
variables, includes, depth, check, True)
File "tools/gyp/pylib/gyp/input.py", line 459, in LoadTargetBuildFile
includes, depth, check, load_dependencies)
File "tools/gyp/pylib/gyp/input.py", line 408, in LoadTargetBuildFile
build_file_data, PHASE_EARLY, variables, build_file_path)
File "tools/gyp/pylib/gyp/input.py", line 1290, in ProcessVariablesAndConditionsInDict
build_file)
File "tools/gyp/pylib/gyp/input.py", line 1305, in ProcessVariablesAndConditionsInList
ProcessVariablesAndConditionsInDict(item, phase, variables, build_file)
File "tools/gyp/pylib/gyp/input.py", line 1264, in ProcessVariablesAndConditionsInDict
ProcessConditionsInDict(the_dict, phase, variables, build_file)
File "tools/gyp/pylib/gyp/input.py", line 1137, in ProcessConditionsInDict
build_file)
File "tools/gyp/pylib/gyp/input.py", line 1061, in EvalCondition
cond_expr, true_dict, false_dict, phase, variables, build_file)
File "tools/gyp/pylib/gyp/input.py", line 1087, in EvalSingleCondition
if eval(ast_code, {'__builtins__': None}, variables):
File "<string>", line 1, in <module>
TypeError: '>=' not supported between instances of 'int' and 'str' while loading dependencies of /Users/samroberts/w/node/node.gyp while trying to load /Users/samroberts/w/node/node.gyp
|
Sorry, something went wrong.
This is a macOS-only issue that @ryzokuken is working on. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks so much!
Sorry, something went wrong.
This is usually a sign that the thing on the left is bytes while the thing on the right is str. |
Sorry, something went wrong.
Noted! I'll try to dig deeper. |
Sorry, something went wrong.
PR-URL: #29416 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
|
@nodejs/lts this needs to land on 12.x-staging, ./configure --ninja is broken on it ATM |
Sorry, something went wrong.
|
12.x isn't LTS yet. This commit will be in the next release |
Sorry, something went wrong.
|
Note that just cherry-picking af161f0 onto 12.x-staging doesn't fix ninja. I started to try to figure out why, but I've been called away to look at something else before making progress. |
Sorry, something went wrong.
PR-URL: #29416 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
| Back | FazBrowse Home | New Git URL |
No description provided.