Skip to content

Commit 8cfbcba

Browse files
authored
Replace deprecated pkgutil.find_loader use (#7906)
### Description Replace deprecated function with modern version <string>: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 <[email protected]>
1 parent 3a0c2d5 commit 8cfbcba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ function clang_format {
167167
}
168168

169169
function is_pip_installed() {
170-
return $("${PY_EXE}" -c "import sys, pkgutil; sys.exit(0 if pkgutil.find_loader(sys.argv[1]) else 1)" $1)
170+
return $("${PY_EXE}" -c "import sys, importlib.util; sys.exit(0 if importlib.util.find_spec(sys.argv[1]) else 1)" $1)
171171
}
172172

173173
function clean_py {

0 commit comments

Comments
 (0)