python-cmaketools / python-cmaketools

Seamless integration of Cmake build system and Python setuptools
MIT License
22 stars 1 forks source link

Python3.6 compatibility #1

Open bpawlik opened 4 years ago

bpawlik commented 4 years ago

This package is not Python3.6 compatible due to this error:

  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'text'

Python 3.7 added the text argument to subprocess.Popen. To have it backwards compatible, you'd need to replace text with universal_newlines. Here is a release note (https://docs.python.org/3/library/subprocess.html#call-function-trio):

Changed in version 3.7: Added the text parameter, as a more understandable alias of universal_newlines. 

Thanks, Bartek

hokiedsp commented 4 years ago

@bpawlik - Thanks for the heads-up. I replaced the sp argument as you suggested. See if it works for you now.

(Eventually I'll set up a test to validate it against older python versions...)

bartek-aws commented 4 years ago

@hokiedsp Thanks for quick turnaround! It looks like problem is solved now in version 0.1.6, thanks!