summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2017-07-11 00:58:39 +0300
committerSviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>2017-07-10 23:58:39 +0200
commit82cf67b36c151b53735ebeb113d7718d26fc339f (patch)
tree39a5179f581417e5d3c04fabd1f415a234ef0d7a
parentfb05b07aa5d419f6b1f4b20bc0458d0ae4013314 (diff)
downloadcherrypy-git-82cf67b36c151b53735ebeb113d7718d26fc339f.tar.gz
Mark docstrings with slash escaping as raw str (PR #1610 by @scop)
* https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior (Python 3.6 invalid escape sequence deprecation)
-rw-r--r--cherrypy/_cpreqbody.py4
-rw-r--r--cherrypy/lib/httputil.py2
-rw-r--r--cherrypy/process/servers.py2
-rw-r--r--cherrypy/process/wspbus.py2
-rw-r--r--cherrypy/test/helper.py2
-rw-r--r--cherrypy/test/test_static.py6
6 files changed, 9 insertions, 9 deletions
diff --git a/cherrypy/_cpreqbody.py b/cherrypy/_cpreqbody.py
index 0d821a57..535d99dc 100644
--- a/cherrypy/_cpreqbody.py
+++ b/cherrypy/_cpreqbody.py
@@ -328,7 +328,7 @@ class Entity(object):
# absence of a charset parameter, is US-ASCII."
# However, many browsers send data in utf-8 with no charset.
attempt_charsets = ['utf-8']
- """A list of strings, each of which should be a known encoding.
+ r"""A list of strings, each of which should be a known encoding.
When the Content-Type of the request body warrants it, each of the given
encodings will be tried in order. The first one to successfully decode the
@@ -577,7 +577,7 @@ class Part(Entity):
# "The default character set, which must be assumed in the absence of a
# charset parameter, is US-ASCII."
attempt_charsets = ['us-ascii', 'utf-8']
- """A list of strings, each of which should be a known encoding.
+ r"""A list of strings, each of which should be a known encoding.
When the Content-Type of the request body warrants it, each of the given
encodings will be tried in order. The first one to successfully decode the
diff --git a/cherrypy/lib/httputil.py b/cherrypy/lib/httputil.py
index e977b77e..a3c9c769 100644
--- a/cherrypy/lib/httputil.py
+++ b/cherrypy/lib/httputil.py
@@ -42,7 +42,7 @@ HTTPDate = functools.partial(email.utils.formatdate, usegmt=True)
def urljoin(*atoms):
- """Return the given path \*atoms, joined into a single URL.
+ r"""Return the given path \*atoms, joined into a single URL.
This will correctly join a SCRIPT_NAME and PATH_INFO into the
original URL, even if either atom is blank.
diff --git a/cherrypy/process/servers.py b/cherrypy/process/servers.py
index 1013f24e..41f871f7 100644
--- a/cherrypy/process/servers.py
+++ b/cherrypy/process/servers.py
@@ -1,4 +1,4 @@
-"""
+r"""
Starting in CherryPy 3.1, cherrypy.server is implemented as an
:ref:`Engine Plugin<plugins>`. It's an instance of
:class:`cherrypy._cpserver.Server`, which is a subclass of
diff --git a/cherrypy/process/wspbus.py b/cherrypy/process/wspbus.py
index cbfbe80b..ade38fa9 100644
--- a/cherrypy/process/wspbus.py
+++ b/cherrypy/process/wspbus.py
@@ -1,4 +1,4 @@
-"""An implementation of the Web Site Process Bus.
+r"""An implementation of the Web Site Process Bus.
This module is completely standalone, depending only on the stdlib.
diff --git a/cherrypy/test/helper.py b/cherrypy/test/helper.py
index 97a843c8..49fc03ec 100644
--- a/cherrypy/test/helper.py
+++ b/cherrypy/test/helper.py
@@ -457,7 +457,7 @@ server.ssl_private_key: r'%s'
'-c', self.config_file,
'-p', self.pid_file,
]
- """
+ r"""
Command for running cherryd server with autoreload enabled
Using
diff --git a/cherrypy/test/test_static.py b/cherrypy/test/test_static.py
index 8cc36d58..52871f29 100644
--- a/cherrypy/test/test_static.py
+++ b/cherrypy/test/test_static.py
@@ -215,13 +215,13 @@ class StaticTest(helper.CPWebCase):
self.assertErrorPage(500)
if sys.version_info >= (3, 3):
errmsg = (
- 'TypeError: staticdir\(\) missing 2 '
+ r'TypeError: staticdir\(\) missing 2 '
'required positional arguments'
)
else:
errmsg = (
- 'TypeError: staticdir\(\) takes at least 2 '
- '(positional )?arguments \(0 given\)'
+ r'TypeError: staticdir\(\) takes at least 2 '
+ r'(positional )?arguments \(0 given\)'
)
self.assertMatchesBody(errmsg.encode('ascii'))