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

Fix a problem under Solaris when using Python 3 #3481

Merged
merged 2 commits into from Nov 27, 2019
Merged

Fix a problem under Solaris when using Python 3 #3481

merged 2 commits into from Nov 27, 2019

Conversation

datalogics-robb
Copy link
Contributor

Fix a problem under Solaris when using Python 3, while maintaining support for Python 2.7. subproces.Popen() produces bytes without the encoding argument in 3, which is not recognized by 2.7, and doesn't need to be decoded.

Also made a few changes to make "pycodestyle" happy for PEP8 compliance.

The issue is Solaris specific, and I don't believe it warrants a test without a Solaris test node.
Manually tested with Python 2.7 and 3.7 on Solaris/SPARC machines.

…pport for Python 2.7. subproces.Popen() produces bytes without the encoding argument in 3, which is not recognized by 2.7, and doesn't need to be decoded.
@mwichmann
Copy link
Collaborator

Python 3.5 failed on Travis CI:

TypeError: __init__() got an unexpected keyword argument 'encoding':
...
 File "/home/travis/build/SCons/scons/src/engine/SCons/Tool/suncxx.py", line 78:
    **popen_args)

@mwichmann
Copy link
Collaborator

Sigh...

Changed in version 3.6: Added encoding and errors parameters

@datalogics-robb
Copy link
Contributor Author

@kulikjak - I realize now that I was getting this error in the scons-3.1.0 which does not have your recent change to add "decode()" - so in your opinion, is this change unnecessary?

@bdbaddog
Copy link
Contributor

Tests passing. Merging.

@bdbaddog bdbaddog merged commit 51506d8 into SCons:master Nov 27, 2019
@bdbaddog
Copy link
Contributor

Oops forgot to ask for a blurb for CHANGES.txt
Please respond with one here and I'll add it and check it into master.

@datalogics-robb
Copy link
Contributor Author

datalogics-robb commented Nov 27, 2019 via email

@bdbaddog
Copy link
Contributor

How's this:

  From Rob Boehne
    - Fix suncxx tool (Oracle Studio compiler) when using Python 3.  Previously would throw an exception.
      Resolved by properly handling tool version string output as unicode.

bdbaddog added a commit that referenced this pull request Nov 27, 2019
@datalogics-robb
Copy link
Contributor Author

@bdbaddog looks good to me.

@bdbaddog
Copy link
Contributor

o.k. done. Thanks!

@mwichmann
Copy link
Collaborator

@datalogics-robb not to pile on or anything, but are you in any position to cross-check any of the work in #3473? Since Solaris users are thin on the ground at the moment...

@datalogics-robb
Copy link
Contributor Author

What would you like me to do?

@bdbaddog
Copy link
Contributor

What would you like me to do?

If you can take a look at the pull request #3473 and see if the changes look reasonable? Make any comments on the changes in that pull request. That would be very helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants