revsys / django-test-plus

Useful additions to Django's default TestCase
https://django-test-plus.readthedocs.io
BSD 3-Clause "New" or "Revised" License
612 stars 62 forks source link

Python 3.12 is not supported #209

Closed offbyone closed 5 months ago

offbyone commented 5 months ago

It looks like using django-test-plus is impossible on Python 3.12

  File "/Users/offby1/projects/worldcon/nomnom/.venv/lib/python3.12/site-packages/_pytest/assertion/rewrite.py", line 178, in exec_module
    exec(co, module.__dict__)
  File "/Users/offby1/projects/worldcon/nomnom/.venv/lib/python3.12/site-packages/test_plus/__init__.py", line 1, in <module>
    from .test import APITestCase, TestCase
  File "/Users/offby1/projects/worldcon/nomnom/.venv/lib/python3.12/site-packages/_pytest/assertion/rewrite.py", line 178, in exec_module
    exec(co, module.__dict__)
  File "/Users/offby1/projects/worldcon/nomnom/.venv/lib/python3.12/site-packages/test_plus/test.py", line 5, in <module>
    from distutils.version import LooseVersion
ModuleNotFoundError: No module named 'distutils'

This can be fixed if you add a dependency on setuptools so that dependency resolvers will find it, or by using a different method of checking versions.