[all] testtools and support for Python 3.10 (error du to deprecation of distutils)

Thomas Goirand zigo at debian.org
Mon Dec 13 16:24:23 UTC 2021


When I try to build rally-openstack, I get this, in the test discovery:

/usr/lib/python3/dist-packages/rally/common/cfg.py:19: in <module>
    from oslo_config import fixture  # noqa
/usr/lib/python3/dist-packages/oslo_config/fixture.py:18: in <module>
    import fixtures
/usr/lib/python3/dist-packages/fixtures/__init__.py:81: in <module>
    from fixtures.fixture import (
/usr/lib/python3/dist-packages/fixtures/fixture.py:34: in <module>
    from fixtures.callmany import (
/usr/lib/python3/dist-packages/fixtures/callmany.py:31: in <module>
    MultipleExceptions = try_import(
/usr/lib/python3/dist-packages/testtools/helpers.py:30: in try_import
/usr/lib/python3/dist-packages/testtools/__init__.py:99: in <module>
    from testtools.distutilscmd import TestCommand
/usr/lib/python3/dist-packages/testtools/distutilscmd.py:7: in <module>
    from distutils.core import Command
/usr/lib/python3.10/distutils/__init__.py:19: in <module>
E   DeprecationWarning: The distutils package is deprecated and slated
for removal in Python 3.12. Use setuptools or check PEP 632 for
potential alternatives

This warning makes it impossible to discover rally-openstack tests,
because of the imports here:


Can someone work on removing distutils support from Testtools? Or is
there a way to trick pytest to not fail? Help would be greatly
appreciated here.


Thomas Goirand (zigo)

More information about the openstack-discuss mailing list