Skip to content

testtools fails to import with Python 3.12 #352

@jakelishman

Description

@jakelishman

At the moment, import testtools fails because of the eager import of distutils via testtools.distutilscmd, which provides the deprecated TestCommand, since distutils is removed from the Python 3.12 standard library.

setuptools still packages distutils, so a temporary workaround could be to add setuptools as a runtime dependency until TestCommand can be removed, or potentially the import of TestCommand in the root could be conditional on Python version?

Happy to provide a patch in either direction, if it would help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions