-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
Labels
Milestone
Description
Steps to reproduce
- Clone/checkout this PR (which updates django-rest-framework from 3.7.1 to 3.7.2): Update djangorestframework to 3.7.2 mozilla/treeherder#2917
- Push to a Travis-enabled GitHub repo
(Or to reproduce locally, clone/checkout, install Virtualbox/Vagrant then vagrant up && vagrant ssh
then ./manage.py check
inside the VM)
Expected behavior
Travis tests pass, like they do on 3.7.1 (which is on master):
https://travis-ci.org/mozilla/treeherder/builds/297971608
Actual behavior
The ./manage.py check
step fails with:
Traceback (most recent call last):
File "./manage.py", line 11, in <module>
execute_from_command_line(sys.argv)
File "/home/travis/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/home/travis/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute
django.setup()
File "/home/travis/venv/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/travis/venv/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/travis/venv/lib/python2.7/site-packages/django/apps/config.py", line 94, in create
module = import_module(entry)
File "/opt/python/2.7.14/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/travis/venv/lib/python2.7/site-packages/hawkrest/__init__.py", line 17, in <module>
from rest_framework.authentication import BaseAuthentication
File "/home/travis/venv/lib/python2.7/site-packages/rest_framework/authentication.py", line 14, in <module>
from rest_framework import HTTP_HEADER_ENCODING, exceptions
File "/home/travis/venv/lib/python2.7/site-packages/rest_framework/exceptions.py", line 17, in <module>
from rest_framework.utils.serializer_helpers import ReturnDict, ReturnList
File "/home/travis/venv/lib/python2.7/site-packages/rest_framework/utils/serializer_helpers.py", line 8, in <module>
from rest_framework.compat import unicode_to_repr
File "/home/travis/venv/lib/python2.7/site-packages/rest_framework/compat.py", line 14, in <module>
from django.contrib.auth import views
File "/home/travis/venv/lib/python2.7/site-packages/django/contrib/auth/views.py", line 11, in <module>
from django.contrib.auth.forms import (
File "/home/travis/venv/lib/python2.7/site-packages/django/contrib/auth/forms.py", line 12, in <module>
from django.contrib.auth.models import User
File "/home/travis/venv/lib/python2.7/site-packages/django/contrib/auth/models.py", line 4, in <module>
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "/home/travis/venv/lib/python2.7/site-packages/django/contrib/auth/base_user.py", line 52, in <module>
class AbstractBaseUser(models.Model):
File "/home/travis/venv/lib/python2.7/site-packages/django/db/models/base.py", line 110, in __new__
app_config = apps.get_containing_app_config(module)
File "/home/travis/venv/lib/python2.7/site-packages/django/apps/registry.py", line 247, in get_containing_app_config
self.check_apps_ready()
File "/home/travis/venv/lib/python2.7/site-packages/django/apps/registry.py", line 125, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
Plus the pytest step fails with the same exception and similar traceback too.
Full log:
https://travis-ci.org/mozilla/treeherder/jobs/297978305#L678
Versions:
- django-rest-framework 3.7.2
- Django 1.11.7
- Python 2.7.14
This appears to be a regression from #5510, CC @felixxm, @carltongibson