From 8119b679eb85cdc0ae3d321e54d06dd0200a1e82 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 16 Sep 2016 12:15:00 -0400 Subject: Refs #27025 -- Fixed "invalid escape sequence" warnings in Python 3.6. http://bugs.python.org/issue27364 --- django/test/client.py | 2 +- django/test/html.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'django/test') diff --git a/django/test/client.py b/django/test/client.py index af55f9efb4..aea051ed2b 100644 --- a/django/test/client.py +++ b/django/test/client.py @@ -33,7 +33,7 @@ __all__ = ('Client', 'RedirectCycleError', 'RequestFactory', 'encode_file', 'enc BOUNDARY = 'BoUnDaRyStRiNg' MULTIPART_CONTENT = 'multipart/form-data; boundary=%s' % BOUNDARY -CONTENT_TYPE_RE = re.compile('.*; charset=([\w\d-]+);?') +CONTENT_TYPE_RE = re.compile(r'.*; charset=([\w\d-]+);?') class RedirectCycleError(Exception): diff --git a/django/test/html.py b/django/test/html.py index 195c61ede0..dfff8d6369 100644 --- a/django/test/html.py +++ b/django/test/html.py @@ -10,7 +10,7 @@ from django.utils import six from django.utils.encoding import force_text, python_2_unicode_compatible from django.utils.html_parser import HTMLParseError, HTMLParser -WHITESPACE = re.compile('\s+') +WHITESPACE = re.compile(r'\s+') def normalize_whitespace(string): -- cgit v1.3