From 129583a0d3cf69b08d058cd751d777588801b7ad Mon Sep 17 00:00:00 2001 From: Mads Jensen Date: Thu, 18 Jul 2019 08:13:01 +0200 Subject: Removed some outdated backwards compatibility imports and misleading comments. EmptyResultSet moved in 46509cf13dbf049f75077981c29ef2c60b5a96ab. FieldDoesNotExist moved in 8958170755b37ce346ae5257c1000bd936faa3b0. BoundField and pretty_name moved in 8550161e531a603d57723850fb09c4c9b7ca60b9. EMPTY_VALUES moved in 471596fc1afcb9c6258d317c619eaf5fd394e797. BaseRunserverCommand moved in 5c53e30607014163872e89c221b206992a9acfef. --- django/forms/fields.py | 2 -- django/forms/forms.py | 5 +---- django/forms/utils.py | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) (limited to 'django/forms') diff --git a/django/forms/fields.py b/django/forms/fields.py index a977256525..03cd8af8d7 100644 --- a/django/forms/fields.py +++ b/django/forms/fields.py @@ -15,8 +15,6 @@ from urllib.parse import urlsplit, urlunsplit from django.core import validators from django.core.exceptions import ValidationError -# Provide this import for backwards compatibility. -from django.core.validators import EMPTY_VALUES # NOQA from django.forms.boundfield import BoundField from django.forms.utils import from_current_timezone, to_current_timezone from django.forms.widgets import ( diff --git a/django/forms/forms.py b/django/forms/forms.py index 0ab25643da..48b237611f 100644 --- a/django/forms/forms.py +++ b/django/forms/forms.py @@ -5,11 +5,8 @@ Form classes import copy from django.core.exceptions import NON_FIELD_ERRORS, ValidationError -# BoundField is imported for backwards compatibility in Django 1.9 -from django.forms.boundfield import BoundField # NOQA from django.forms.fields import Field, FileField -# pretty_name is imported for backwards compatibility in Django 1.9 -from django.forms.utils import ErrorDict, ErrorList, pretty_name # NOQA +from django.forms.utils import ErrorDict, ErrorList from django.forms.widgets import Media, MediaDefiningClass from django.utils.datastructures import MultiValueDict from django.utils.functional import cached_property diff --git a/django/forms/utils.py b/django/forms/utils.py index 8bfdd0a799..5ae137943a 100644 --- a/django/forms/utils.py +++ b/django/forms/utils.py @@ -2,7 +2,7 @@ import json from collections import UserList from django.conf import settings -from django.core.exceptions import ValidationError # backwards compatibility +from django.core.exceptions import ValidationError from django.utils import timezone from django.utils.html import escape, format_html, format_html_join, html_safe from django.utils.translation import gettext_lazy as _ -- cgit v1.3