Skip to content

pytest: deprecation warning: imp module is deprecated. #29

@dalf

Description

@dalf

When I use pytest, I have this warning:

.../ve/lib/python3.6/distutils/__init__.py:4
  .../ve/lib/python3.6/distutils/__init__.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp

It seems related to this line:

from distutils.spawn import find_executable

distutils imports imp.

shutil.which seems to be an alternative supported since Python 3.3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions