4762: The encoding argument to subprocess.Popen was only added in Python 3.6


What version are you running?


What steps will reproduce the problem?

  1. using a version of Python 3 before Python 3.6 (Python 3.5 in our case)
  2. try to call RBTools
  3. watch it blow up!

What is the expected output? What do you see instead?

The RBTools code checks for Python 3, and if it exists, calls subprocess.Popen with an encoding keyword argument. This argument can only be used in version Python 3.6 and later.

What operating system are you using?

MacOS X 10.14

Attach the debug out from the command.

$ rbt post --description '<snip>' --summary '<snip>'
ERROR: Could not load SCM Client "tfs"
Traceback (most recent call last):
  File "/Users/kevinding/.pyenv/versions/3.5.2/envs/venv-etl-py3/lib/python3.5/site-packages/rbtools/clients/__init__.py", line 735, in load_scmclients
    client = ep.load()(config=config, options=options)
  File "/Users/kevinding/.pyenv/versions/3.5.2/envs/venv-etl-py3/lib/python3.5/site-packages/rbtools/clients/tfs.py", line 979, in __init__
  File "/Users/kevinding/.pyenv/versions/3.5.2/envs/venv-etl-py3/lib/python3.5/site-packages/rbtools/utils/process.py", line 165, in execute
TypeError: __init__() got an unexpected keyword argument 'encoding'
CRITICAL: __init__() got an unexpected keyword argument 'encoding'
Traceback (most recent call last):
  File "/Users/kevinding/.pyenv/versions/3.5.2/envs/venv-etl-py3/bin/rbt-log-post", line 109, in <module>
  File "/Users/kevinding/.pyenv/versions/3.5.2/envs/venv-etl-py3/bin/rbt-log-post", line 105, in main
  File "/Users/kevinding/.pyenv/versions/3.5.2/lib/python3.5/subprocess.py", line 581, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['rbt', 'post', '--description', 'Date:   Wed Oct 31 10:42:26 2018 -0700\n\nupgrade appt_histories package to py3\n\n', '--markdown', '--summary', '[etl] upgrade appt_histories package to py3']' returned non-zero exit status 1

Please provide any additional information below.