python-tornado/fix-syntax-warnings.patch

40 lines
1.6 KiB
Diff

diff --git a/tornado/test/web_test.py b/tornado/test/web_test.py
index 16938c4..b1ae474 100644
--- a/tornado/test/web_test.py
+++ b/tornado/test/web_test.py
@@ -398,7 +398,7 @@ class AuthRedirectTest(WebTestCase):
follow_redirects=False)
self.assertEqual(response.code, 302)
self.assertTrue(re.match(
- 'http://example.com/login\?next=http%3A%2F%2F127.0.0.1%3A[0-9]+%2Fabsolute',
+ r'http://example.com/login\?next=http%3A%2F%2F127.0.0.1%3A[0-9]+%2Fabsolute',
response.headers['Location']), response.headers['Location'])
diff --git a/tornado/util.py b/tornado/util.py
index a42ebeb..0b93ff9 100644
--- a/tornado/util.py
+++ b/tornado/util.py
@@ -252,7 +252,7 @@ _re_unescape_pattern = re.compile(r'\\(.)', re.DOTALL)
def re_unescape(s):
# type: (str) -> str
- """Unescape a string escaped by `re.escape`.
+ r"""Unescape a string escaped by `re.escape`.
May raise ``ValueError`` for regular expressions which could not
have been produced by `re.escape` (for example, strings containing
diff --git a/tornado/web.py b/tornado/web.py
index 6760b0b..4340b16 100644
--- a/tornado/web.py
+++ b/tornado/web.py
@@ -1887,7 +1887,7 @@ class _ApplicationRouter(ReversibleRuleRouter):
class Application(ReversibleRouter):
- """A collection of request handlers that make up a web application.
+ r"""A collection of request handlers that make up a web application.
Instances of this class are callable and can be passed directly to
HTTPServer to serve the application::