Fix rbt post on Python 3.5 (invalid kwarg)
Review Request #10354 — Created Dec. 10, 2018 and submitted
Popen didn't gain the encoding parameter until 3.6:
https://docs.python.org/3/whatsnew/3.6.html#subprocessOn 3.5, universal_newlines is available, but encoding is not:
https://docs.python.org/3.5/library/subprocess.htmlWith these changes, rbt post works in a Python 3.5.6 environment. Similarly, the test suite passes for me (save 3 svn-related tests that are failing due to not have subversion installed).
I'd be happy to add some new tests if desired, but this also seems small enough in scope that it should be safe as-is.
- Used
rbt post
in Python 2.7, 3.5, and 3.6 with these changes rbt post
works when pushing diffs with Unicode content- Test suite passes locally
Description | From | Last Updated |
---|---|---|
Also, can you please fill out the "Testing Done" field to describe what you've done to test this? |
david | |
This can use rbtools.utils.encoding.force_unicode |
david | |
This can use rbtools.utils.encoding.force_unicode |
david | |
I think you'd need to add the six.PY3 and sys.version_info.minor >= 6 check here too. |
david |
-
-
Any input here?
rbt post
continues to be non-functional on Python 3.5 due to this bug, despiterbtools
' advertised compatibility with Python 3.5
-
-
-
-
rbtools/utils/process.py (Diff revision 1) I think you'd need to add the
six.PY3 and sys.version_info.minor >= 6
check here too.
Change Summary:
Use force_unicode, describe testing done
Description: |
|
|||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
|||||||||||||||||||||||||||||||||
Commit: |
|
|||||||||||||||||||||||||||||||||
Diff: |
Revision 2 (+14 -5) |