SERVER-115024 Replace distutils with shutil for Python 3.13 compatibi… (#44926)

GitOrigin-RevId: c70259fcdd5ed99a35fed85910ae777a4ba7dfce
This commit is contained in:
Nick Jefferies 2025-12-09 13:28:28 -05:00 committed by MongoDB Bot
parent 7021d2bfab
commit 0e4b035959
2 changed files with 3 additions and 4 deletions

View File

@ -14,7 +14,6 @@ import time
from abc import ABCMeta, abstractmethod
from collections import namedtuple
from datetime import datetime, timedelta
from distutils import spawn
from io import StringIO
from typing import List, Tuple
@ -265,7 +264,7 @@ class WindowsDumper(Dumper):
"""Find the installed debugger."""
# We are looking for c:\Program Files (x86)\Windows Kits\8.1\Debuggers\x64
debugger = "cdb.exe"
cdb = spawn.find_executable(debugger)
cdb = shutil.which(debugger)
if cdb is not None:
return cdb
from win32com.shell import shell, shellcon

View File

@ -2,12 +2,12 @@
import logging
import os
import shutil
import signal
import subprocess
import sys
import time
from datetime import datetime
from distutils import spawn
import psutil
@ -61,7 +61,7 @@ def find_program(prog, paths):
if os.path.exists(full_prog):
return full_prog
return spawn.find_executable(prog)
return shutil.which(prog)
def callo(args, logger):