Skip to content
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

No friendly message about removal of filtersets emitted. #4644

rgammans opened this issue Nov 1, 2016 · 4 comments

No friendly message about removal of filtersets emitted. #4644

rgammans opened this issue Nov 1, 2016 · 4 comments


Copy link

rgammans commented Nov 1, 2016

I'm getting the following backtrace since 3.5.2 was released.

mod_wsgi (pid=107917): Exception occurred processing WSGI script '/my_project/my_app/deploy/my_app.wsgi'.
Traceback (most recent call last):
  File "my_project/my_app/deploy/python-env/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/core/handlers/", line 170, in __call__
  File "my_project/my_app/deploy/python-env/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/core/handlers/", line 52, in load_middleware
    mw_instance = mw_class()
  File "my_project/my_app/deploy/python-env/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/middleware/", line 24, in __init__
    for url_pattern in get_resolver(None).url_patterns:
  File "my_project/my_app/deploy/python-env/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/core/", line 402, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "my_project/my_app/deploy/python-env/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/core/", line 396, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/usr/lib/python2.7/importlib/", line 37, in import_module
  File "my_project/my_app/deploy/cgi/my_app/", line 7, in <module>
    from rest_framework import routers, serializers, viewsets
  File "my_project/my_app/deploy/python-env/lib/python2.7/site-packages/djangorestframework-3.5.2-py2.7.egg/rest_framework/", line 26, in <module>
    from rest_framework import generics, mixins, views
  File "my_project/my_app/deploy/python-env/lib/python2.7/site-packages/djangorestframework-3.5.2-py2.7.egg/rest_framework/", line 25, in <module>
    class GenericAPIView(views.APIView):
  File "my_project/my_app/deploy/python-env/lib/python2.7/site-packages/djangorestframework-3.5.2-py2.7.egg/rest_framework/", line 44, in GenericAPIView
    filter_backends = api_settings.DEFAULT_FILTER_BACKENDS
  File "my_project/my_app/deploy/python-env/lib/python2.7/site-packages/djangorestframework-3.5.2-py2.7.egg/rest_framework/", line 220, in __getattr__
    val = perform_import(val, attr)
  File "my_project/my_app/deploy/python-env/lib/python2.7/site-packages/djangorestframework-3.5.2-py2.7.egg/rest_framework/", line 165, in perform_import
    return [import_from_string(item, setting_name) for item in val]
  File "my_project/my_app/deploy/python-env/lib/python2.7/site-packages/djangorestframework-3.5.2-py2.7.egg/rest_framework/", line 181, in import_from_string
    raise ImportError(msg)
ImportError: Could not import 'rest_framework.filters.DjangoFilterBackend' for API setting 'DEFAULT_FILTER_BACKENDS'. ImportError: No module named rest_framework.filterset.




My reading of #4620 is that this should be a friendly warning pointing be to the direct issue. Instead I had to dig through the diff of pip freeze outputs to trace it down. No worries it's done now. BVUt it might help other later if your warning appears . ;-).

Copy link

tomchristie commented Nov 1, 2016


Copy link

tomchristie commented Nov 1, 2016

Related: #4643

@tomchristie tomchristie added this to the 3.5.3 Release milestone Nov 1, 2016
Copy link

njoyard commented Nov 2, 2016

As is, 3.5.1+ are not compatible with code written for 3.5.0. I get that this was a bugfix (or did I understand something wrong ?) but 3.5.1 should really be called 4.0.0, and so on. Getting an ImportError because you depend on "djangorestframework>=3.5,<3.6" is really bad semver practice :(

Copy link

tomchristie commented Nov 6, 2016

It's not intentional. It's a bugfix causing a bug. We'll resolve it and issue a new release ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

3 participants