Index: django/newforms/util.py
===================================================================
--- django/newforms/util.py	(revision 4438)
+++ django/newforms/util.py	(working copy)
@@ -5,6 +5,13 @@
 # a leading space. Assumes keys do not need to be XML-escaped.
 flatatt = lambda attrs: u''.join([u' %s="%s"' % (k, escape(v)) for k, v in attrs.items()])
 
+def smart_deunicode(s):
+    if not isinstance(s, basestring):
+        s = str(s)
+    elif not isinstance(s, str):
+        s = s.encode(settings.DEFAULT_CHARSET)
+    return s
+
 def smart_unicode(s):
     if not isinstance(s, basestring):
         s = unicode(str(s))
@@ -57,10 +64,10 @@
     def __init__(self, message):
         "ValidationError can be passed a string or a list."
         if isinstance(message, list):
-            self.messages = ErrorList([smart_unicode(msg) for msg in message])
+            self.messages = ErrorList([smart_deunicode(msg) for msg in message])
         else:
             assert isinstance(message, basestring), ("%s should be a basestring" % repr(message))
-            message = smart_unicode(message)
+            message = smart_deunicode(message)
             self.messages = ErrorList([message])
 
     def __str__(self):
Index: tests/modeltests/model_forms/models.py
===================================================================
--- tests/modeltests/model_forms/models.py	(revision 4438)
+++ tests/modeltests/model_forms/models.py	(working copy)
@@ -112,7 +112,7 @@
 If you call save() with invalid data, you'll get a ValueError.
 >>> f = CategoryForm({'name': '', 'url': 'foo'})
 >>> f.errors
-{'name': [u'This field is required.']}
+{'name': ['This field is required.']}
 >>> f.clean_data
 Traceback (most recent call last):
 ...
Index: tests/regressiontests/forms/tests.py
===================================================================
--- tests/regressiontests/forms/tests.py	(revision 4438)
+++ tests/regressiontests/forms/tests.py	(working copy)
@@ -805,11 +805,11 @@
 >>> f.clean(None)
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean('')
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean([1, 2, 3])
 u'[1, 2, 3]'
 
@@ -834,7 +834,7 @@
 >>> f.clean('1234567890a')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Ensure this value has at most 10 characters.']
+ValidationError: ['Ensure this value has at most 10 characters.']
 
 CharField accepts an optional min_length parameter:
 >>> f = CharField(min_length=10, required=False)
@@ -843,7 +843,7 @@
 >>> f.clean('12345')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Ensure this value has at least 10 characters.']
+ValidationError: ['Ensure this value has at least 10 characters.']
 >>> f.clean('1234567890')
 u'1234567890'
 >>> f.clean('1234567890a')
@@ -853,11 +853,11 @@
 >>> f.clean('')
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean('12345')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Ensure this value has at least 10 characters.']
+ValidationError: ['Ensure this value has at least 10 characters.']
 >>> f.clean('1234567890')
 u'1234567890'
 >>> f.clean('1234567890a')
@@ -869,11 +869,11 @@
 >>> f.clean('')
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean(None)
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean('1')
 1
 >>> isinstance(f.clean('1'), int)
@@ -883,7 +883,7 @@
 >>> f.clean('a')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a whole number.']
+ValidationError: ['Enter a whole number.']
 >>> f.clean('1 ')
 1
 >>> f.clean(' 1')
@@ -893,7 +893,7 @@
 >>> f.clean('1a')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a whole number.']
+ValidationError: ['Enter a whole number.']
 
 >>> f = IntegerField(required=False)
 >>> f.clean('')
@@ -911,7 +911,7 @@
 >>> f.clean('a')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a whole number.']
+ValidationError: ['Enter a whole number.']
 >>> f.clean('1 ')
 1
 >>> f.clean(' 1')
@@ -921,14 +921,14 @@
 >>> f.clean('1a')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a whole number.']
+ValidationError: ['Enter a whole number.']
 
 IntegerField accepts an optional max_value parameter:
 >>> f = IntegerField(max_value=10)
 >>> f.clean(None)
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean(1)
 1
 >>> f.clean(10)
@@ -936,24 +936,24 @@
 >>> f.clean(11)
 Traceback (most recent call last):
 ...
-ValidationError: [u'Ensure this value is less than or equal to 10.']
+ValidationError: ['Ensure this value is less than or equal to 10.']
 >>> f.clean('10')
 10
 >>> f.clean('11')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Ensure this value is less than or equal to 10.']
+ValidationError: ['Ensure this value is less than or equal to 10.']
 
 IntegerField accepts an optional min_value parameter:
 >>> f = IntegerField(min_value=10)
 >>> f.clean(None)
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean(1)
 Traceback (most recent call last):
 ...
-ValidationError: [u'Ensure this value is greater than or equal to 10.']
+ValidationError: ['Ensure this value is greater than or equal to 10.']
 >>> f.clean(10)
 10
 >>> f.clean(11)
@@ -968,11 +968,11 @@
 >>> f.clean(None)
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean(1)
 Traceback (most recent call last):
 ...
-ValidationError: [u'Ensure this value is greater than or equal to 10.']
+ValidationError: ['Ensure this value is greater than or equal to 10.']
 >>> f.clean(10)
 10
 >>> f.clean(11)
@@ -986,7 +986,7 @@
 >>> f.clean(21)
 Traceback (most recent call last):
 ...
-ValidationError: [u'Ensure this value is less than or equal to 20.']
+ValidationError: ['Ensure this value is less than or equal to 20.']
 
 # DateField ###################################################################
 
@@ -1019,19 +1019,19 @@
 >>> f.clean('2006-4-31')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid date.']
+ValidationError: ['Enter a valid date.']
 >>> f.clean('200a-10-25')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid date.']
+ValidationError: ['Enter a valid date.']
 >>> f.clean('25/10/06')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid date.']
+ValidationError: ['Enter a valid date.']
 >>> f.clean(None)
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 
 >>> f = DateField(required=False)
 >>> f.clean(None)
@@ -1055,15 +1055,15 @@
 >>> f.clean('2006-10-25')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid date.']
+ValidationError: ['Enter a valid date.']
 >>> f.clean('10/25/2006')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid date.']
+ValidationError: ['Enter a valid date.']
 >>> f.clean('10/25/06')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid date.']
+ValidationError: ['Enter a valid date.']
 
 # TimeField ###################################################################
 
@@ -1080,11 +1080,11 @@
 >>> f.clean('hello')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid time.']
+ValidationError: ['Enter a valid time.']
 >>> f.clean('1:24 p.m.')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid time.']
+ValidationError: ['Enter a valid time.']
 
 TimeField accepts an optional input_formats parameter:
 >>> f = TimeField(input_formats=['%I:%M %p'])
@@ -1102,7 +1102,7 @@
 >>> f.clean('14:30:45')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid time.']
+ValidationError: ['Enter a valid time.']
 
 # DateTimeField ###############################################################
 
@@ -1143,11 +1143,11 @@
 >>> f.clean('hello')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid date/time.']
+ValidationError: ['Enter a valid date/time.']
 >>> f.clean('2006-10-25 4:30 p.m.')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid date/time.']
+ValidationError: ['Enter a valid date/time.']
 
 DateField accepts an optional input_formats parameter:
 >>> f = DateTimeField(input_formats=['%Y %m %d %I:%M %p'])
@@ -1167,7 +1167,7 @@
 >>> f.clean('2006-10-25 14:30:45')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid date/time.']
+ValidationError: ['Enter a valid date/time.']
 
 >>> f = DateTimeField(required=False)
 >>> f.clean(None)
@@ -1187,19 +1187,19 @@
 >>> f.clean('3G3')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid value.']
+ValidationError: ['Enter a valid value.']
 >>> f.clean(' 2A2')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid value.']
+ValidationError: ['Enter a valid value.']
 >>> f.clean('2A2 ')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid value.']
+ValidationError: ['Enter a valid value.']
 >>> f.clean('')
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 
 >>> f = RegexField('^\d[A-F]\d$', required=False)
 >>> f.clean('2A2')
@@ -1209,7 +1209,7 @@
 >>> f.clean('3G3')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid value.']
+ValidationError: ['Enter a valid value.']
 >>> f.clean('')
 u''
 
@@ -1222,15 +1222,15 @@
 >>> f.clean('3G3')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid value.']
+ValidationError: ['Enter a valid value.']
 >>> f.clean(' 2A2')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid value.']
+ValidationError: ['Enter a valid value.']
 >>> f.clean('2A2 ')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid value.']
+ValidationError: ['Enter a valid value.']
 
 RegexField takes an optional error_message argument:
 >>> f = RegexField('^\d\d\d\d$', error_message='Enter a four-digit number.')
@@ -1239,22 +1239,22 @@
 >>> f.clean('123')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a four-digit number.']
+ValidationError: ['Enter a four-digit number.']
 >>> f.clean('abcd')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a four-digit number.']
+ValidationError: ['Enter a four-digit number.']
 
 RegexField also access min_length and max_length parameters, for convenience.
 >>> f = RegexField('^\d+$', min_length=5, max_length=10)
 >>> f.clean('123')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Ensure this value has at least 5 characters.']
+ValidationError: ['Ensure this value has at least 5 characters.']
 >>> f.clean('abc')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Ensure this value has at least 5 characters.']
+ValidationError: ['Ensure this value has at least 5 characters.']
 >>> f.clean('12345')
 u'12345'
 >>> f.clean('1234567890')
@@ -1262,11 +1262,11 @@
 >>> f.clean('12345678901')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Ensure this value has at most 10 characters.']
+ValidationError: ['Ensure this value has at most 10 characters.']
 >>> f.clean('12345a')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid value.']
+ValidationError: ['Enter a valid value.']
 
 # EmailField ##################################################################
 
@@ -1274,25 +1274,25 @@
 >>> f.clean('')
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean(None)
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean('person@example.com')
 u'person@example.com'
 >>> f.clean('foo')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid e-mail address.']
+ValidationError: ['Enter a valid e-mail address.']
 >>> f.clean('foo@')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid e-mail address.']
+ValidationError: ['Enter a valid e-mail address.']
 >>> f.clean('foo@bar')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid e-mail address.']
+ValidationError: ['Enter a valid e-mail address.']
 
 >>> f = EmailField(required=False)
 >>> f.clean('')
@@ -1304,28 +1304,28 @@
 >>> f.clean('foo')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid e-mail address.']
+ValidationError: ['Enter a valid e-mail address.']
 >>> f.clean('foo@')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid e-mail address.']
+ValidationError: ['Enter a valid e-mail address.']
 >>> f.clean('foo@bar')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid e-mail address.']
+ValidationError: ['Enter a valid e-mail address.']
 
 EmailField also access min_length and max_length parameters, for convenience.
 >>> f = EmailField(min_length=10, max_length=15)
 >>> f.clean('a@foo.com')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Ensure this value has at least 10 characters.']
+ValidationError: ['Ensure this value has at least 10 characters.']
 >>> f.clean('alf@foo.com')
 u'alf@foo.com'
 >>> f.clean('alf123456788@foo.com')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Ensure this value has at most 15 characters.']
+ValidationError: ['Ensure this value has at most 15 characters.']
 
 # URLField ##################################################################
 
@@ -1333,11 +1333,11 @@
 >>> f.clean('')
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean(None)
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean('http://example.com')
 u'http://example.com'
 >>> f.clean('http://www.example.com')
@@ -1345,27 +1345,27 @@
 >>> f.clean('foo')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid URL.']
+ValidationError: ['Enter a valid URL.']
 >>> f.clean('example.com')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid URL.']
+ValidationError: ['Enter a valid URL.']
 >>> f.clean('http://')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid URL.']
+ValidationError: ['Enter a valid URL.']
 >>> f.clean('http://example')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid URL.']
+ValidationError: ['Enter a valid URL.']
 >>> f.clean('http://example.')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid URL.']
+ValidationError: ['Enter a valid URL.']
 >>> f.clean('http://.com')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid URL.']
+ValidationError: ['Enter a valid URL.']
 
 >>> f = URLField(required=False)
 >>> f.clean('')
@@ -1379,27 +1379,27 @@
 >>> f.clean('foo')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid URL.']
+ValidationError: ['Enter a valid URL.']
 >>> f.clean('example.com')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid URL.']
+ValidationError: ['Enter a valid URL.']
 >>> f.clean('http://')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid URL.']
+ValidationError: ['Enter a valid URL.']
 >>> f.clean('http://example')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid URL.']
+ValidationError: ['Enter a valid URL.']
 >>> f.clean('http://example.')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid URL.']
+ValidationError: ['Enter a valid URL.']
 >>> f.clean('http://.com')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid URL.']
+ValidationError: ['Enter a valid URL.']
 
 URLField takes an optional verify_exists parameter, which is False by default.
 This verifies that the URL is live on the Internet and doesn't return a 404 or 500:
@@ -1409,15 +1409,15 @@
 >>> f.clean('http://example')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid URL.']
+ValidationError: ['Enter a valid URL.']
 >>> f.clean('http://www.jfoiwjfoi23jfoijoaijfoiwjofiwjefewl.com') # bad domain
 Traceback (most recent call last):
 ...
-ValidationError: [u'This URL appears to be a broken link.']
+ValidationError: ['This URL appears to be a broken link.']
 >>> f.clean('http://google.com/we-love-microsoft.html') # good domain, bad page
 Traceback (most recent call last):
 ...
-ValidationError: [u'This URL appears to be a broken link.']
+ValidationError: ['This URL appears to be a broken link.']
 >>> f = URLField(verify_exists=True, required=False)
 >>> f.clean('')
 u''
@@ -1429,13 +1429,13 @@
 >>> f.clean('http://f.com')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Ensure this value has at least 15 characters.']
+ValidationError: ['Ensure this value has at least 15 characters.']
 >>> f.clean('http://example.com')
 u'http://example.com'
 >>> f.clean('http://abcdefghijklmnopqrstuvwxyz.com')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Ensure this value has at most 20 characters.']
+ValidationError: ['Ensure this value has at most 20 characters.']
 
 # BooleanField ################################################################
 
@@ -1443,11 +1443,11 @@
 >>> f.clean('')
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean(None)
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean(True)
 True
 >>> f.clean(False)
@@ -1481,11 +1481,11 @@
 >>> f.clean('')
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean(None)
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean(1)
 u'1'
 >>> f.clean('1')
@@ -1493,7 +1493,7 @@
 >>> f.clean('3')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Select a valid choice. 3 is not one of the available choices.']
+ValidationError: ['Select a valid choice. 3 is not one of the available choices.']
 
 >>> f = ChoiceField(choices=[('1', '1'), ('2', '2')], required=False)
 >>> f.clean('')
@@ -1507,7 +1507,7 @@
 >>> f.clean('3')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Select a valid choice. 3 is not one of the available choices.']
+ValidationError: ['Select a valid choice. 3 is not one of the available choices.']
 
 >>> f = ChoiceField(choices=[('J', 'John'), ('P', 'Paul')])
 >>> f.clean('J')
@@ -1515,7 +1515,7 @@
 >>> f.clean('John')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Select a valid choice. John is not one of the available choices.']
+ValidationError: ['Select a valid choice. John is not one of the available choices.']
 
 # NullBooleanField ############################################################
 
@@ -1537,11 +1537,11 @@
 >>> f.clean('')
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean(None)
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean([1])
 [u'1']
 >>> f.clean(['1'])
@@ -1555,19 +1555,19 @@
 >>> f.clean('hello')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a list of values.']
+ValidationError: ['Enter a list of values.']
 >>> f.clean([])
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean(())
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean(['3'])
 Traceback (most recent call last):
 ...
-ValidationError: [u'Select a valid choice. 3 is not one of the available choices.']
+ValidationError: ['Select a valid choice. 3 is not one of the available choices.']
 
 >>> f = MultipleChoiceField(choices=[('1', '1'), ('2', '2')], required=False)
 >>> f.clean('')
@@ -1587,7 +1587,7 @@
 >>> f.clean('hello')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a list of values.']
+ValidationError: ['Enter a list of values.']
 >>> f.clean([])
 []
 >>> f.clean(())
@@ -1595,7 +1595,7 @@
 >>> f.clean(['3'])
 Traceback (most recent call last):
 ...
-ValidationError: [u'Select a valid choice. 3 is not one of the available choices.']
+ValidationError: ['Select a valid choice. 3 is not one of the available choices.']
 
 # ComboField ##################################################################
 
@@ -1607,19 +1607,19 @@
 >>> f.clean('longemailaddress@example.com')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Ensure this value has at most 20 characters.']
+ValidationError: ['Ensure this value has at most 20 characters.']
 >>> f.clean('not an e-mail')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid e-mail address.']
+ValidationError: ['Enter a valid e-mail address.']
 >>> f.clean('')
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean(None)
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 
 >>> f = ComboField(fields=[CharField(max_length=20), EmailField()], required=False)
 >>> f.clean('test@example.com')
@@ -1627,11 +1627,11 @@
 >>> f.clean('longemailaddress@example.com')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Ensure this value has at most 20 characters.']
+ValidationError: ['Ensure this value has at most 20 characters.']
 >>> f.clean('not an e-mail')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid e-mail address.']
+ValidationError: ['Enter a valid e-mail address.']
 >>> f.clean('')
 u''
 >>> f.clean(None)
@@ -1645,27 +1645,27 @@
 >>> f.clean(None)
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean('')
 Traceback (most recent call last):
 ...
-ValidationError: [u'This field is required.']
+ValidationError: ['This field is required.']
 >>> f.clean('hello')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a list of values.']
+ValidationError: ['Enter a list of values.']
 >>> f.clean(['hello', 'there'])
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid date.', u'Enter a valid time.']
+ValidationError: ['Enter a valid date.', 'Enter a valid time.']
 >>> f.clean(['2006-01-10', 'there'])
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid time.']
+ValidationError: ['Enter a valid time.']
 >>> f.clean(['hello', '07:30'])
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid date.']
+ValidationError: ['Enter a valid date.']
 
 >>> f = SplitDateTimeField(required=False)
 >>> f.clean([datetime.date(2006, 1, 10), datetime.time(7, 30)])
@@ -1675,19 +1675,19 @@
 >>> f.clean('hello')
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a list of values.']
+ValidationError: ['Enter a list of values.']
 >>> f.clean(['hello', 'there'])
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid date.', u'Enter a valid time.']
+ValidationError: ['Enter a valid date.', 'Enter a valid time.']
 >>> f.clean(['2006-01-10', 'there'])
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid time.']
+ValidationError: ['Enter a valid time.']
 >>> f.clean(['hello', '07:30'])
 Traceback (most recent call last):
 ...
-ValidationError: [u'Enter a valid date.']
+ValidationError: ['Enter a valid date.']
 
 #########
 # Forms #
@@ -1749,7 +1749,7 @@
 >>> p.is_bound
 True
 >>> p.errors
-{'first_name': [u'This field is required.'], 'last_name': [u'This field is required.'], 'birthday': [u'This field is required.']}
+{'first_name': ['This field is required.'], 'last_name': ['This field is required.'], 'birthday': ['This field is required.']}
 >>> p.is_valid()
 False
 >>> p.clean_data
@@ -1818,7 +1818,7 @@
 
 >>> p = Person({'last_name': u'Lennon'})
 >>> p.errors
-{'first_name': [u'This field is required.'], 'birthday': [u'This field is required.']}
+{'first_name': ['This field is required.'], 'birthday': ['This field is required.']}
 >>> p.is_valid()
 False
 >>> p.errors.as_ul()
@@ -1833,7 +1833,7 @@
 ...
 AttributeError: 'Person' object has no attribute 'clean_data'
 >>> p['first_name'].errors
-[u'This field is required.']
+['This field is required.']
 >>> p['first_name'].errors.as_ul()
 u'<ul class="errorlist"><li>This field is required.</li></ul>'
 >>> p['first_name'].errors.as_text()
@@ -2189,7 +2189,7 @@
 returns a list of input.
 >>> f = SongForm({'name': 'Yesterday'}, auto_id=False)
 >>> f.errors
-{'composers': [u'This field is required.']}
+{'composers': ['This field is required.']}
 >>> f = SongForm({'name': 'Yesterday', 'composers': ['J']}, auto_id=False)
 >>> f.errors
 {}
@@ -2223,10 +2223,10 @@
 {}
 >>> f = UserRegistration({}, auto_id=False)
 >>> f.errors
-{'username': [u'This field is required.'], 'password1': [u'This field is required.'], 'password2': [u'This field is required.']}
+{'username': ['This field is required.'], 'password1': ['This field is required.'], 'password2': ['This field is required.']}
 >>> f = UserRegistration({'username': 'adrian', 'password1': 'foo', 'password2': 'bar'}, auto_id=False)
 >>> f.errors
-{'password2': [u'Please make sure your passwords match.']}
+{'password2': ['Please make sure your passwords match.']}
 >>> f = UserRegistration({'username': 'adrian', 'password1': 'foo', 'password2': 'foo'}, auto_id=False)
 >>> f.errors
 {}
@@ -2257,10 +2257,10 @@
 <tr><th>Password1:</th><td><ul class="errorlist"><li>This field is required.</li></ul><input type="password" name="password1" /></td></tr>
 <tr><th>Password2:</th><td><ul class="errorlist"><li>This field is required.</li></ul><input type="password" name="password2" /></td></tr>
 >>> f.errors
-{'username': [u'This field is required.'], 'password1': [u'This field is required.'], 'password2': [u'This field is required.']}
+{'username': ['This field is required.'], 'password1': ['This field is required.'], 'password2': ['This field is required.']}
 >>> f = UserRegistration({'username': 'adrian', 'password1': 'foo', 'password2': 'bar'}, auto_id=False)
 >>> f.errors
-{'__all__': [u'Please make sure your passwords match.']}
+{'__all__': ['Please make sure your passwords match.']}
 >>> print f.as_table()
 <tr><td colspan="2"><ul class="errorlist"><li>Please make sure your passwords match.</li></ul></td></tr>
 <tr><th>Username:</th><td><input type="text" name="username" value="adrian" maxlength="10" /></td></tr>
@@ -2551,7 +2551,7 @@
 validation error rather than using the initial value for 'username'.
 >>> p = UserRegistration({'password': 'secret'})
 >>> p.errors
-{'username': [u'This field is required.']}
+{'username': ['This field is required.']}
 >>> p.is_valid()
 False
 
@@ -2596,7 +2596,7 @@
 validation error rather than using the initial value for 'username'.
 >>> p = UserRegistration({'password': 'secret'}, initial={'username': 'django'})
 >>> p.errors
-{'username': [u'This field is required.']}
+{'username': ['This field is required.']}
 >>> p.is_valid()
 False
 
@@ -2655,9 +2655,9 @@
 ... }
 >>> p = Person(data, prefix='person1')
 >>> p.errors
-{'first_name': [u'This field is required.'], 'last_name': [u'This field is required.'], 'birthday': [u'This field is required.']}
+{'first_name': ['This field is required.'], 'last_name': ['This field is required.'], 'birthday': ['This field is required.']}
 >>> p['first_name'].errors
-[u'This field is required.']
+['This field is required.']
 >>> p['person1-first_name'].errors
 Traceback (most recent call last):
 ...
@@ -2672,7 +2672,7 @@
 ... }
 >>> p = Person(data, prefix='person1')
 >>> p.errors
-{'first_name': [u'This field is required.'], 'last_name': [u'This field is required.'], 'birthday': [u'This field is required.']}
+{'first_name': ['This field is required.'], 'last_name': ['This field is required.'], 'birthday': ['This field is required.']}
 
 With prefixes, a single data dictionary can hold data for multiple instances
 of the same form.
