Skip to content

django_template benchmark fails on main due to lack of distutils #247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mdboom opened this issue Nov 28, 2022 · 0 comments · Fixed by #248
Closed

django_template benchmark fails on main due to lack of distutils #247

mdboom opened this issue Nov 28, 2022 · 0 comments · Fixed by #248

Comments

@mdboom
Copy link
Contributor

mdboom commented Nov 28, 2022

The django_template benchmark probably needs to add setuptools as a dependency.

# /home/runner/work/ideas/ideas/venv/cpython3.12-714fa4245ae0-compat-07e19f9c3993/bin/python -u /home/runner/.local/lib/python3.8/site-packages/pyperformance/data-files/benchmarks/bm_django_template/run_benchmark.py --output /tmp/tmpie4ikqo9 --inherit-environ PYPERFORMANCE_RUNID
Traceback (most recent call last):
  File "/home/runner/.local/lib/python3.8/site-packages/pyperformance/data-files/benchmarks/bm_django_template/run_benchmark.py", line 8, in <module>
    import django.conf
  File "/home/runner/work/ideas/ideas/venv/cpython3.12-714fa4245ae0-compat-07e19f9c3993/lib/python3.12/site-packages/django/__init__.py", line 1, in <module>
    from django.utils.version import get_version
  File "/home/runner/work/ideas/ideas/venv/cpython3.12-714fa4245ae0-compat-07e19f9c3993/lib/python3.12/site-packages/django/utils/version.py", line 6, in <module>
    from distutils.version import LooseVersion
ModuleNotFoundError: No module named 'distutils'
Command failed with exit code 1
ERROR: Benchmark django_template failed: Benchmark died
ericsnowcurrently pushed a commit that referenced this issue Nov 28, 2022
Fixes #247.

Django has a runtime dependency on distutils, so adding setuptools as a dependency resolves it.

This has already been resolved upstream [1], but this allows us to keep using the same version of Django for the benchmark.

[1] django/django#14240
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant