diff --git a/django/core/servers/basehttp.py b/django/core/servers/basehttp.py index e4b010a4b2..e90946fa16 100644 --- a/django/core/servers/basehttp.py +++ b/django/core/servers/basehttp.py @@ -12,7 +12,6 @@ from __future__ import unicode_literals import socket import sys from wsgiref import simple_server -from wsgiref.util import FileWrapper # NOQA: for backwards compatibility from django.core.exceptions import ImproperlyConfigured from django.core.handlers.wsgi import ISO_8859_1, UTF_8 diff --git a/django/forms/fields.py b/django/forms/fields.py index 4f0ba23052..59490a318a 100644 --- a/django/forms/fields.py +++ b/django/forms/fields.py @@ -33,10 +33,6 @@ from django.utils import six from django.utils.six.moves.urllib.parse import urlsplit, urlunsplit from django.utils.translation import ugettext_lazy as _, ungettext_lazy -# Provide this import for backwards compatibility. -from django.core.validators import EMPTY_VALUES # NOQA - - __all__ = ( 'Field', 'CharField', 'IntegerField', 'DateField', 'TimeField', 'DateTimeField', 'DurationField', diff --git a/django/test/testcases.py b/django/test/testcases.py index 2896631d47..5195145998 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -14,7 +14,6 @@ import sys import threading import unittest import warnings -from unittest import skipIf # NOQA: Imported here for backward compatibility from unittest.util import safe_repr from django.apps import apps diff --git a/django/utils/log.py b/django/utils/log.py index fc350e0b5e..af72bb0447 100644 --- a/django/utils/log.py +++ b/django/utils/log.py @@ -12,10 +12,6 @@ from django.utils.encoding import force_text from django.utils.module_loading import import_string from django.views.debug import ExceptionReporter, get_exception_reporter_filter -# Imports kept for backwards-compatibility in Django 1.7. -from logging import NullHandler # NOQA -from logging.config import dictConfig # NOQA - getLogger = logging.getLogger # Default logging for Django. This sends an email to the site admins on every @@ -80,7 +76,7 @@ def configure_logging(logging_config, logging_settings): # First find the logging configuration function ... logging_config_func = import_string(logging_config) - dictConfig(DEFAULT_LOGGING) + logging.config.dictConfig(DEFAULT_LOGGING) # ... then invoke it with the logging settings if logging_settings: diff --git a/tests/admin_views/admin.py b/tests/admin_views/admin.py index c9f0dbc2e3..dd49a0c0da 100644 --- a/tests/admin_views/admin.py +++ b/tests/admin_views/admin.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import tempfile import os +from wsgiref.util import FileWrapper from django import forms from django.contrib import admin @@ -10,7 +11,6 @@ from django.contrib.admin.views.main import ChangeList from django.core.exceptions import ValidationError from django.core.files.storage import FileSystemStorage from django.core.mail import EmailMessage -from django.core.servers.basehttp import FileWrapper from django.conf.urls import url from django.forms.models import BaseModelFormSet from django.http import HttpResponse, StreamingHttpResponse