Ticket #17867: 17867.diff

File 17867.diff, 2.5 KB (added by Pierre <pierre.matri@…>, 13 years ago)
Line 
1Only in Django-1.4c1-new/: build
2diff -crB Django-1.4c1//django/core/validators.py Django-1.4c1-new//django/core/validators.py
3*** Django-1.4c1//django/core/validators.py 2012-03-05 18:30:56.000000000 +0100
4--- Django-1.4c1-new//django/core/validators.py 2012-03-11 10:56:49.252890377 +0100
5***************
6*** 160,166 ****
7 r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*" # dot-atom
8 # quoted-string, see also http://tools.ietf.org/html/rfc2822#section-3.2.5
9 r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"'
10! r')@((?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?$)' # domain
11 r'|\[(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\]$', re.IGNORECASE) # literal form, ipv4 address (SMTP 4.1.3)
12 validate_email = EmailValidator(email_re, _(u'Enter a valid e-mail address.'), 'invalid')
13
14--- 160,166 ----
15 r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*" # dot-atom
16 # quoted-string, see also http://tools.ietf.org/html/rfc2822#section-3.2.5
17 r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"'
18! r')@((?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)$)' # domain
19 r'|\[(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\]$', re.IGNORECASE) # literal form, ipv4 address (SMTP 4.1.3)
20 validate_email = EmailValidator(email_re, _(u'Enter a valid e-mail address.'), 'invalid')
21
22diff -crB Django-1.4c1//tests/regressiontests/forms/tests/fields.py Django-1.4c1-new//tests/regressiontests/forms/tests/fields.py
23*** Django-1.4c1//tests/regressiontests/forms/tests/fields.py 2012-03-05 18:30:59.000000000 +0100
24--- Django-1.4c1-new//tests/regressiontests/forms/tests/fields.py 2012-03-11 11:17:18.072861669 +0100
25***************
26*** 538,543 ****
27--- 538,544 ----
28 self.assertEqual(u'example@valid-with-hyphens.com', f.clean('example@valid-with-hyphens.com'))
29 self.assertRaisesMessage(ValidationError, "[u'Enter a valid e-mail address.']", f.clean, 'example@.com')
30 self.assertEqual(u'local@domain.with.idn.xyz\xe4\xf6\xfc\xdfabc.part.com', f.clean('local@domain.with.idn.xyzäöüßabc.part.com'))
31+ self.assertEqual(u'mailtest@domain.with.idn.tld.उदाहरण.परीक्षा', f.clean('mailtest@domain.with.idn.tld.उदाहरण.परीक्षा'))
32
33 def test_email_regexp_for_performance(self):
34 f = EmailField()
Back to Top