Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-75574

Stop using deprecated python distutils package

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Server Development Platform
    • Fully Compatible
    • Sharding EMEA 2023-04-03

      ptyhon distutils package has been deprecated (pep-0632).

      Currently it seems we are using it only for the 'spawn' module and in particular for the find_executable function:

      $ git grep -n 'distutils' -- ':!/src/third_party/'
      
      buildscripts/ciconfig/evergreen.py:9:import distutils.spawn
      buildscripts/ciconfig/evergreen.py:23:        if not distutils.spawn.find_executable(evergreen_binary):
      buildscripts/resmokelib/configure_resmoke.py:8:import distutils.spawn
      buildscripts/resmokelib/configure_resmoke.py:125:        resolved_path = distutils.spawn.find_executable(_config.UNDO_RECORDER_PATH)
      buildscripts/resmokelib/hang_analyzer/dumper.py:11:from distutils import spawn
      buildscripts/resmokelib/hang_analyzer/process.py:9:from distutils import spawn
      buildscripts/resmokelib/powercycle/powercycle.py:6:import distutils.spawn
      buildscripts/resmokelib/powercycle/powercycle.py:983:    if not distutils.spawn.find_executable("rsync"):
      buildscripts/resmokelib/powercycle/powercycle.py:1374:    mongo_executable = distutils.spawn.find_executable(
      site_scons/site_tools/distsrc.py:33:from distutils.spawn import find_executable
      

      We should be able to easily replace distutils.spawn.find_executable with shutils.which.

            Assignee:
            steve.gross@mongodb.com Steve Gross
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: