From 449290406c37010f04bcc114b3af356bb1ae50f8 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 10 Feb 2020 11:52:19 +0100 Subject: [PATCH] test_argcomplete: remove usage of `distutils.spawn` (#6703) Fixes collection error with Python 3.5.3 (Travis): testing/test_parseopt.py:2: in import distutils.spawn .tox/py35-coverage/lib/python3.5/distutils/__init__.py:4: in import imp .tox/py35-coverage/lib/python3.5/imp.py:33: in PendingDeprecationWarning, stacklevel=2) E PendingDeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses Build log: https://travis-ci.org/blueyed/pytest/builds/648305304 --- testing/test_parseopt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/test_parseopt.py b/testing/test_parseopt.py index ded5167d8..7c94fdb1e 100644 --- a/testing/test_parseopt.py +++ b/testing/test_parseopt.py @@ -1,7 +1,7 @@ import argparse -import distutils.spawn import os import shlex +import shutil import sys import py @@ -291,7 +291,7 @@ class TestParser: def test_argcomplete(testdir, monkeypatch): - if not distutils.spawn.find_executable("bash"): + if not shutil.which("bash"): pytest.skip("bash not available") script = str(testdir.tmpdir.join("test_argcomplete"))