From 8cfbcbabd1529ef4090fb6f7ffbeef47d6b70cc2 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Tue, 9 Jul 2024 01:29:29 -0500 Subject: [PATCH] Replace deprecated pkgutil.find_loader use (#7906) ### Description Replace deprecated function with modern version :1: DeprecationWarning: 'pkgutil.find_loader' is deprecated and slated for removal in Python 3.14; use importlib.util.find_spec() instead ### Types of changes - [x] Non-breaking change (fix or new feature that would not break existing functionality). Signed-off-by: Hans Johnson --- runtests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtests.sh b/runtests.sh index 0b3e20ce49..65e3a2bb6b 100755 --- a/runtests.sh +++ b/runtests.sh @@ -167,7 +167,7 @@ function clang_format { } function is_pip_installed() { - return $("${PY_EXE}" -c "import sys, pkgutil; sys.exit(0 if pkgutil.find_loader(sys.argv[1]) else 1)" $1) + return $("${PY_EXE}" -c "import sys, importlib.util; sys.exit(0 if importlib.util.find_spec(sys.argv[1]) else 1)" $1) } function clean_py {