From 805be64769c077ccd98026980b562f90ef6898c0 Mon Sep 17 00:00:00 2001 From: David Stainton Date: Mon, 9 Jan 2017 17:58:41 +0000 Subject: [PATCH 1/3] Use `which` from twisted fixes #2856 --- integration/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/conftest.py b/integration/conftest.py index c1c31bc7a..e92e3eb5a 100644 --- a/integration/conftest.py +++ b/integration/conftest.py @@ -6,8 +6,8 @@ from sys import stdout as _stdout from os import mkdir, listdir, unlink from os.path import join, abspath, curdir, exists from tempfile import mkdtemp, mktemp -from shutilwhich import which +from twisted.python.procutils import which from twisted.internet.defer import Deferred, DeferredList from twisted.internet.task import deferLater from twisted.internet.error import ProcessExitedAlready From 223b694313d394ab73259bbc4538cde4ba005b35 Mon Sep 17 00:00:00 2001 From: David Stainton Date: Mon, 9 Jan 2017 19:51:38 +0000 Subject: [PATCH 2/3] Remove shutilwhich from setup.py extras --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index e5663db96..38b9f0696 100644 --- a/setup.py +++ b/setup.py @@ -279,7 +279,6 @@ setup(name="tahoe-lafs", # also set in __init__.py "txi2p >= 0.3.1", # in case pip's resolver doesn't work "pytest", "pytest-twisted", - "shutilwhich >= 1.1.0", # in Python 3.3 stdlib ], "tor": [ "foolscap[tor] >= 0.12.5", From c83dde8629398b2bfccd2198f4f342359073d945 Mon Sep 17 00:00:00 2001 From: David Stainton Date: Mon, 9 Jan 2017 19:54:51 +0000 Subject: [PATCH 3/3] Use first element returned by which --- integration/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration/conftest.py b/integration/conftest.py index e92e3eb5a..19f5600d1 100644 --- a/integration/conftest.py +++ b/integration/conftest.py @@ -73,7 +73,7 @@ def temp_dir(request): @pytest.fixture(scope='session') def flog_binary(): - return which('flogtool') + return which('flogtool')[0] @pytest.fixture(scope='session') @@ -95,7 +95,7 @@ def flog_gatherer(reactor, temp_dir, flog_binary, request): twistd_protocol = _MagicTextProtocol("Gatherer waiting at") twistd_process = reactor.spawnProcess( twistd_protocol, - which('twistd'), + which('twistd')[0], ( 'twistd', '--nodaemon', '--python', join(gather_dir, 'gatherer.tac'),