summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorholger krekel <holger@merlinux.eu>2013-10-22 10:59:09 +0200
committerholger krekel <holger@merlinux.eu>2013-10-22 10:59:09 +0200
commita563aecda09d01b4ecd278315360148de6a36be9 (patch)
tree74777c342297b348af294e6cbd7ae32e387e1da5
parentf914825d783da586e20ad77e1b7347b97a4510ea (diff)
downloadtox-a563aecda09d01b4ecd278315360148de6a36be9.tar.gz
fix issue129: tox now uses Popen(..., universal_newlines=True) to force
creation of unicode stdout/stderr streams. fixes a problem on specific platform configs when creating virtualenvs with Python3.3. Thanks Jorgen Sch?fer or investigation and solution sketch.
-rwxr-xr-xCHANGELOG5
-rw-r--r--tox/_cmdline.py4
-rw-r--r--tox/_pytestplugin.py1
-rw-r--r--tox/_venv.py2
4 files changed, 10 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 6661295..d153797 100755
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,11 @@
1.6.2.dev
---------
+- fix issue129: tox now uses Popen(..., universal_newlines=True) to force
+ creation of unicode stdout/stderr streams. fixes a problem on specific
+ platform configs when creating virtualenvs with Python3.3. Thanks Jorgen Schäfer
+ or investigation and solution sketch.
+
- fix issue128: enable full substitution in install_command,
thanks for the PR to Ronald Evers
diff --git a/tox/_cmdline.py b/tox/_cmdline.py
index 24e47ba..5407b4a 100644
--- a/tox/_cmdline.py
+++ b/tox/_cmdline.py
@@ -93,7 +93,8 @@ class Action(object):
if cwd is None:
# XXX cwd = self.session.config.cwd
cwd = py.path.local()
- popen = self._popen(args, cwd, env=env, stdout=f, stderr=STDOUT)
+ popen = self._popen(args, cwd, env=env,
+ stdout=f, stderr=STDOUT)
popen.outpath = outpath
popen.args = [str(x) for x in args]
popen.cwd = cwd
@@ -150,6 +151,7 @@ class Action(object):
if env is None:
env = os.environ.copy()
return self.session.popen(args, shell=False, cwd=str(cwd),
+ universal_newlines=True,
stdout=stdout, stderr=stderr, env=env)
diff --git a/tox/_pytestplugin.py b/tox/_pytestplugin.py
index 6c90c8d..4958617 100644
--- a/tox/_pytestplugin.py
+++ b/tox/_pytestplugin.py
@@ -130,6 +130,7 @@ def pytest_funcarg__mocksession(request):
def make_emptydir(self, path):
pass
def popen(self, args, cwd, shell=None,
+ universal_newlines=False,
stdout=None, stderr=None, env=None):
pm = pcallMock(args, cwd, env, stdout, stderr, shell)
self._pcalls.append(pm)
diff --git a/tox/_venv.py b/tox/_venv.py
index ec7ada2..cb53ec0 100644
--- a/tox/_venv.py
+++ b/tox/_venv.py
@@ -228,7 +228,7 @@ class VirtualEnv(object):
args = [self.envconfig.envpython, str(setup_py), '--name']
output = action.popen(args, cwd=setupdir, redirect=False,
returnout=True)
- name = output.strip().decode('utf-8')
+ name = output.strip()
egg_info = setupdir.join('.'.join((name, 'egg-info')))
for conf_file in (setup_py, setup_cfg):
if (not egg_info.check() or (conf_file.check()