From 592e3440bdb840afde8c382aa53343f98dda6854 Mon Sep 17 00:00:00 2001 From: "v.shepard" Date: Fri, 19 May 2023 14:08:26 +0200 Subject: [PATCH] Replace deprecated distutils find_executable on shutil which --- testgres/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testgres/utils.py b/testgres/utils.py index 4d99c69d..d8006d08 100644 --- a/testgres/utils.py +++ b/testgres/utils.py @@ -12,7 +12,10 @@ from contextlib import contextmanager from packaging.version import Version -from distutils.spawn import find_executable +try: + from shutil import which as find_executable +except ImportError: + from distutils.spawn import find_executable from six import iteritems from .config import testgres_config