summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-01-21 20:02:00 -0500
committerGitHub <noreply@github.com>2017-01-21 20:02:00 -0500
commitd170c63351944fd91b2206d10f89e7ff75b53b76 (patch)
treee2be66471ab071fa0ce75097d66650b650c53853 /django/forms
parentc22212220a7900173358a1f16179dcfc9e03de78 (diff)
Refs #23919 -- Removed misc references to Python 2.
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/utils.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/django/forms/utils.py b/django/forms/utils.py
index 59d70178f4..b23e6be0cc 100644
--- a/django/forms/utils.py
+++ b/django/forms/utils.py
@@ -1,5 +1,6 @@
import json
import sys
+from collections import UserList
from django.conf import settings
from django.core.exceptions import ValidationError # backwards compatibility
@@ -8,11 +9,6 @@ from django.utils.encoding import force_text
from django.utils.html import escape, format_html, format_html_join, html_safe
from django.utils.translation import ugettext_lazy as _
-try:
- from collections import UserList
-except ImportError: # Python 2
- from UserList import UserList
-
def pretty_name(name):
"""Converts 'first_name' to 'First name'"""