Tox failures on django-1.11/djangodev
See original GitHub issueJust ran tox locally and got lots of failures:
py27-django18-sqlite: commands succeeded
py27-django18-mysql: commands succeeded
py27-django18-postgresql: commands succeeded
py27-django19-sqlite: commands succeeded
py27-django19-mysql: commands succeeded
py27-django19-postgresql: commands succeeded
py27-django110-sqlite: commands succeeded
py27-django110-mysql: commands succeeded
py27-django110-postgresql: commands succeeded
ERROR: py27-django11-sqlite: commands failed
ERROR: py27-django11-mysql: commands failed
ERROR: py27-django11-postgresql: commands failed
ERROR: py27-djangodev-sqlite: could not install deps [pytest, pytest-django, pytest-cov, mock, coverage, django-dbdiff>=0.4.0, git+https://github.com/jpic/django-autoslug.git@dj20#egg=django-autoslug, https://github.com/django/django/archive/master.tar.gz]; v = InvocationError('/Users/user/play/django-cities-light/.tox/py27-djangodev-sqlite/bin/pip install pytest pytest-django pytest-cov mock coverage django-dbdiff>=0.4.0 git+https://github.com/jpic/django-autoslug.git@dj20#egg=django-autoslug https://github.com/django/django/archive/master.tar.gz (see /Users/user/play/django-cities-light/.tox/py27-djangodev-sqlite/log/py27-djangodev-sqlite-1.log)', 1)
ERROR: py27-djangodev-mysql: could not install deps [pytest, pytest-django, pytest-cov, mock, coverage, django-dbdiff>=0.4.0, git+https://github.com/jpic/django-autoslug.git@dj20#egg=django-autoslug, https://github.com/django/django/archive/master.tar.gz, mysqlclient]; v = InvocationError('/Users/user/play/django-cities-light/.tox/py27-djangodev-mysql/bin/pip install pytest pytest-django pytest-cov mock coverage django-dbdiff>=0.4.0 git+https://github.com/jpic/django-autoslug.git@dj20#egg=django-autoslug https://github.com/django/django/archive/master.tar.gz mysqlclient (see /Users/user/play/django-cities-light/.tox/py27-djangodev-mysql/log/py27-djangodev-mysql-1.log)', 1)
ERROR: py27-djangodev-postgresql: could not install deps [pytest, pytest-django, pytest-cov, mock, coverage, django-dbdiff>=0.4.0, git+https://github.com/jpic/django-autoslug.git@dj20#egg=django-autoslug, https://github.com/django/django/archive/master.tar.gz, psycopg2]; v = InvocationError('/Users/user/play/django-cities-light/.tox/py27-djangodev-postgresql/bin/pip install pytest pytest-django pytest-cov mock coverage django-dbdiff>=0.4.0 git+https://github.com/jpic/django-autoslug.git@dj20#egg=django-autoslug https://github.com/django/django/archive/master.tar.gz psycopg2 (see /Users/user/play/django-cities-light/.tox/py27-djangodev-postgresql/log/py27-djangodev-postgresql-1.log)', 1)
py35-django18-sqlite: commands succeeded
py35-django18-mysql: commands succeeded
py35-django18-postgresql: commands succeeded
py35-django19-sqlite: commands succeeded
py35-django19-mysql: commands succeeded
py35-django19-postgresql: commands succeeded
py35-django110-sqlite: commands succeeded
py35-django110-mysql: commands succeeded
py35-django110-postgresql: commands succeeded
ERROR: py35-django11-sqlite: commands failed
ERROR: py35-django11-mysql: commands failed
ERROR: py35-django11-postgresql: commands failed
py35-djangodev-sqlite: commands succeeded
py35-djangodev-mysql: commands succeeded
py35-djangodev-postgresql: commands succeeded
py36-django18-sqlite: commands succeeded
py36-django18-mysql: commands succeeded
py36-django18-postgresql: commands succeeded
py36-django19-sqlite: commands succeeded
py36-django19-mysql: commands succeeded
py36-django19-postgresql: commands succeeded
py36-django110-sqlite: commands succeeded
py36-django110-mysql: commands succeeded
py36-django110-postgresql: commands succeeded
ERROR: py36-django11-sqlite: commands failed
ERROR: py36-django11-mysql: commands failed
ERROR: py36-django11-postgresql: commands failed
py36-djangodev-sqlite: commands succeeded
py36-djangodev-mysql: commands succeeded
py36-djangodev-postgresql: commands succeeded
djangodev tests fail on py27 with the following error:
Collecting https://github.com/django/django/archive/master.tar.gz
Downloading https://github.com/django/django/archive/master.tar.gz (7.7MB)
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/var/folders/y4/mx8yb7kd1gl26frnh7014dvm0000gp/T/pip-c59Jun-build/setup.py", line 32, in <module>
version = __import__('django').get_version()
File "django/__init__.py", line 1, in <module>
from django.utils.version import get_version
File "django/utils/version.py", line 59, in <module>
@functools.lru_cache()
AttributeError: 'module' object has no attribute 'lru_cache'
django11 tests have something different:
File "/Users/user/play/django-cities-light/.tox/py36-django11-postgresql/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 265, in __init__
self.result = func()
File "/Users/user/play/django-cities-light/.tox/py36-django11-postgresql/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
res = hook_impl.function(*args)
File "/Users/user/play/django-cities-light/.tox/py36-django11-postgresql/lib/python3.6/site-packages/pytest_django/plugin.py", line 241, in pytest_load_initial_conftests
from django.conf import settings as dj_settings
ModuleNotFoundError: No module named 'django'
ERROR: InvocationError: '/Users/user/play/django-cities-light/.tox/py36-django11-postgresql/bin/py.test --cov cities_light --create-db --strict -r fEsxXw cities_light'
First failure can be fixed by running djangodev tests only on python=>3.5 (tox.ini), because Django 2.0 dropped support for python 2.7:
envlist = py{27,35,36}-django{18,19,110,11}{-sqlite,-mysql,-postgresql},py{35,36}-djangodev{-sqlite,-mysql,-postgresql}
Second failure is due to 11
in tox envlist. Should be 111. So the final proposed fix is:
envlist = py{27,35,36}-django{18,19,110,111}{-sqlite,-mysql,-postgresql},py{35,36}-djangodev{-sqlite,-mysql,-postgresql}
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Unit tests
Tox is a tool for running tests in different virtual environments. ... Some tests are skipped or expected failures on a particular database...
Read more >Top 10 Mistakes That Django Developers Make
In this tutorial, we will look at some common mistakes that are often made by Django developers and ways to avoid them. Whether...
Read more >tox refuses to use deps setting in py38 and various pip ...
This answer is an addendum to Jürgen's answer: The cause of
Read more >1401246 - [Tracking] Update to Django 1.11
Django 1.11 was deployed to production June 5th, 2018. It seems to perform roughly the same as Django 1.8, and we haven't found...
Read more >Testing Django applications in 2018
Which means I've written a lot of tests for code that uses Django. ... especially with multiple test failures — and I find...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You are now admin ;)
Thanks!
I merged my fixes from stable/3.x.x to master (your Django 1.11/2.0 commits became duplicated, but git was smart enough). From now on I’ll try to base all my features on master.