-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Always use python3 for zap_cluster_list.py #7589
Merged
mspang
merged 1 commit into
project-chip:master
from
mspang:for-chip/fix-zap-cluster-py2
Jun 14, 2021
Merged
Always use python3 for zap_cluster_list.py #7589
mspang
merged 1 commit into
project-chip:master
from
mspang:for-chip/fix-zap-cluster-py2
Jun 14, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pullapprove
bot
requested review from
andy31415,
bzbarsky-apple,
chrisdecenzo,
jelderton,
jmartinez-silabs,
LuDuda,
saurabhst and
woody-apple
June 14, 2021 05:40
saurabhst
approved these changes
Jun 14, 2021
Unfortunately python is still python2 on some systems and this becomes the default python interpreter for exec_script(). If we run zap_cluster_list.py with python2, it's a parse error due to use of python 3 only optional typing syntax. If we instead execute the script via gn_run_binary.py, the shebang line (#!/usr/bin/env python3) in the script will be respected. This is more likely to work until python2 is dead everywhere, so do that. Tested by building as a subproject of a project that uses the default script_executable in GN on a system with /usr/bin/python as python2.
mspang
force-pushed
the
for-chip/fix-zap-cluster-py2
branch
from
June 14, 2021 05:56
ff75bb5
to
1104374
Compare
woody-apple
previously requested changes
Jun 14, 2021
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.
Can we update this to conform to the standard template?
Damian-Nordic
approved these changes
Jun 14, 2021
jmartinez-silabs
approved these changes
Jun 14, 2021
I think you'll find that I covered all the bases? Can we please focus on substance over form? |
andy31415
dismissed
woody-apple’s stale review
June 14, 2021 17:47
summary updated to match the template
mkardous-silabs
pushed a commit
to mkardous-silabs/connectedhomeip
that referenced
this pull request
Jun 14, 2021
Unfortunately python is still python2 on some systems and this becomes the default python interpreter for exec_script(). If we run zap_cluster_list.py with python2, it's a parse error due to use of python 3 only optional typing syntax. If we instead execute the script via gn_run_binary.py, the shebang line (#!/usr/bin/env python3) in the script will be respected. This is more likely to work until python2 is dead everywhere, so do that. Tested by building as a subproject of a project that uses the default script_executable in GN on a system with /usr/bin/python as python2.
nikita-s-wrk
pushed a commit
to nikita-s-wrk/connectedhomeip
that referenced
this pull request
Sep 23, 2021
Unfortunately python is still python2 on some systems and this becomes the default python interpreter for exec_script(). If we run zap_cluster_list.py with python2, it's a parse error due to use of python 3 only optional typing syntax. If we instead execute the script via gn_run_binary.py, the shebang line (#!/usr/bin/env python3) in the script will be respected. This is more likely to work until python2 is dead everywhere, so do that. Tested by building as a subproject of a project that uses the default script_executable in GN on a system with /usr/bin/python as python2.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Unfortunately python is still python2 on some systems and this becomes
the default python interpreter for exec_script(). If we run
zap_cluster_list.py with python2, it's a parse error due to use of
python 3 only optional typing syntax.
If we instead execute the script via gn_run_binary.py, the shebang line
(#!/usr/bin/env python3) in the script will be respected. This is more
likely to work until python2 is dead everywhere...
Change overview
...so do that.
Testing
Tested by building as a subproject of a project that uses the default
script_executable in GN on a system with /usr/bin/python as python2.