Repository: conan-io/conan

Issue:
[bug] New warning in python 3.8 makes some tests fail (line buffering isn't supported in binary mode)
<!--
  Please don't forget to update the issue title.
  Include all applicable information to help us reproduce your problem.

  To help us debug your issue please explain:
-->

### Environment Details (include every applicable attribute)
  * Operating System+version: Arch Linux
  * Compiler+version: -
  * Conan version: develop
  * Python version: python 3.8

### Steps to reproduce (Include if Applicable)

Run some unit tests, for example:

```
nosetests conans.test.functional.settings
```

### Logs (Executed commands with output) (Include/Attach if Applicable)

```
$ nosetests conans.test.functional.settings
............F............F.F.............
======================================================================
FAIL: test_only_cppstd (conan.conans.test.functional.settings.cppstd.compiler_cppstd_test.UseCompilerCppStdSettingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/siu/src/extern/conan/conans/test/functional/settings/cppstd/compiler_cppstd_test.py", line 140, in test_only_cppstd
    self.t.run("info . -s cppstd=14")
  File "/usr/lib/python3.8/contextlib.py", line 120, in __exit__
    next(self.gen)
  File "/home/siu/src/extern/conan/conans/test/utils/deprecation.py", line 13, in catch_deprecation_warning
    test_suite.assertEqual(len(w), n)
AssertionError: 2 != 1

======================================================================
FAIL: gcc_8_std_20_test (conan.conans.test.functional.settings.cppstd_test.StdCppTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/siu/src/extern/conan/conans/test/functional/settings/cppstd_test.py", line 47, in gcc_8_std_20_test
    client.run('create . user/testing -s compiler="gcc" '
  File "/usr/lib/python3.8/contextlib.py", line 120, in __exit__
    next(self.gen)
  File "/home/siu/src/extern/conan/conans/test/utils/deprecation.py", line 13, in catch_deprecation_warning
    test_suite.assertEqual(len(w), n)
AssertionError: 2 != 1

======================================================================
FAIL: use_wrong_setting_for_compiler_test (conan.conans.test.functional.settings.cppstd_test.StdCppTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/siu/src/extern/conan/conans/test/functional/settings/cppstd_test.py", line 23, in use_wrong_setting_for_compiler_test
    client.run('create . user/testing -s compiler="gcc" '
  File "/usr/lib/python3.8/contextlib.py", line 120, in __exit__
    next(self.gen)
  File "/home/siu/src/extern/conan/conans/test/utils/deprecation.py", line 13, in catch_deprecation_warning
    test_suite.assertEqual(len(w), n)
AssertionError: 2 != 1

----------------------------------------------------------------------
Ran 41 tests in 4.690s

FAILED (failures=3)
```

<!--
  Your log content should be related to the bug description, it can be:
  - Conan command output
  - Server output (Artifactory, conan_server)
-->



Discussion:

Resolving patch:
diff --git a/conans/client/conf/detect.py b/conans/client/conf/detect.py
--- a/conans/client/conf/detect.py
+++ b/conans/client/conf/detect.py
@@ -10,7 +10,8 @@
 
 
 def _execute(command):
-    proc = Popen(command, shell=True, bufsize=1, stdout=PIPE, stderr=STDOUT)
+    proc = Popen(command, shell=True, bufsize=1, universal_newlines=True, stdout=PIPE,
+                 stderr=STDOUT)
 
     output_buffer = []
     while True:


Test patch: