Skip to content

[Warning] Replace distutils.spawn.find_executable with shutil.whichΒ #3028

@santigandolfo

Description

@santigandolfo

The package distutils is deprecated and slated for removal in Python 3.12. We are using the function find_executable that belongs to that package. We should instead be using which from the package shutil.

Therefore we should make the change from
from distutils.spawn import find_executable
to
from shutil import which

from distutils.spawn import find_executable

And the change from
if find_executable("docker-compose") is None:
to
if which("docker-compose") is None:

if find_executable("docker-compose") is None:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions