Skip to content

PendingDeprecationWarning: The built in 'rest_framework.filters.FilterSet' is pending deprecation. You should use 'django_filters.rest_framework.FilterSet' instead #4643

@dilyanpalauzov

Description

@dilyanpalauzov

When I start django-rest-framework with 'python3 -Wall runserver' and print the backtrace in rest_framework/filters.py: if django_filters: class FilterSetMetaClass(DFFilterSetMetaClass), I get the text below. i don't call anything apart from 'runserver'. In case it has nothing to do with the code I have written, as I suppose, but the warning is emitted just because Django tries to call FilterSetMetaClass.new from utils/autoreload.py, please modify the code, so that no warnings are issued if no rest_framework.filters.FilterSet is called. I use Django 1.10.2 with DRF 3.5.2 .

opt/virtualenv/django/lib/python3.4/site-packages/rest_framework/filters.py:50: PendingDeprecationWarning: The built in 'rest_framework.filters.FilterSet' is pending deprecation. You should use 'django_filters.rest_framework.FilterSet' instead.
  PendingDeprecationWarning
File "/opt/virtualenv/django/lib/python3.4/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
File "/opt/virtualenv/django/lib/python3.4/site-packages/django/core/management/commands/runserver.py", line 121, in inner_run
    self.check(display_num_errors=True)
File "/opt/virtualenv/django/lib/python3.4/site-packages/django/core/management/base.py", line 374, in check
    include_deployment_checks=include_deployment_checks,
File "/opt/virtualenv/django/lib/python3.4/site-packages/django/core/management/base.py", line 361, in _run_checks
    return checks.run_checks(**kwargs)
File "/opt/virtualenv/django/lib/python3.4/site-packages/django/core/checks/registry.py", line 81, in run_checks
    new_errors = check(app_configs=app_configs)
File "/opt/virtualenv/django/lib/python3.4/site-packages/django/core/checks/urls.py", line 14, in check_url_config
    return check_resolver(resolver)
File "/opt/virtualenv/django/lib/python3.4/site-packages/django/core/checks/urls.py", line 24, in check_resolver
    for pattern in resolver.url_patterns:
File "/opt/virtualenv/django/lib/python3.4/site-packages/django/utils/functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
File "/opt/virtualenv/django/lib/python3.4/site-packages/django/urls/resolvers.py", line 313, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/opt/virtualenv/django/lib/python3.4/site-packages/django/utils/functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
File "/opt/virtualenv/django/lib/python3.4/site-packages/django/urls/resolvers.py", line 306, in urlconf_module
    return import_module(self.urlconf_name)
File "/opt/virtualenv/django/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy