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

Decode stdout on Python 3 #1890

Closed
wants to merge 2 commits into from

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Sep 25, 2019

Checklist
  • npm install && npm test passes
  • tests are included
  • documentation is changed or added
  • commit message follows commit guidelines
Description of change

Fixes #1849, #1854, #1861 https://github.com/nodejs/node-gyp/search?q=CLT&type=Issues

Python 2 does not make a distinction between bytes and str but Python 3 does. When we make calls to subprocess.Popen() on Python 3 we should stdout.decode("utf8") before performing string manipulations on it.

This modification also allows Accept Python 3 by default #1844 to pass all Travis CI tests.

Copy link
Contributor

@sam-github sam-github left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty reasonable to me.

rvagg pushed a commit that referenced this pull request Sep 26, 2019
PR-URL: #1890
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
@rvagg
Copy link
Member

rvagg commented Sep 26, 2019

landed in d90d9c5

@rvagg rvagg closed this Sep 26, 2019
@rvagg rvagg mentioned this pull request Sep 26, 2019
rvagg pushed a commit that referenced this pull request Sep 26, 2019
PR-URL: #1890
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
@rvagg rvagg mentioned this pull request Sep 26, 2019
@cclauss cclauss deleted the decode.stdout-on-Python3 branch September 26, 2019 04:43
@cclauss cclauss added the Python label Oct 4, 2019
@cclauss cclauss mentioned this pull request Oct 24, 2019
4 tasks
chrmoritz added a commit to chrmoritz/node that referenced this pull request Nov 5, 2019
original commit: nodejs/node-gyp@19398a4
Refs: nodejs/node-gyp#1890
Co-Authored-By: Christian Clauss <cclauss@me.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could not get CLTVersion
5 participants