diff --git a/boto/__init__.py b/boto/__init__.py index 70efe5feb5..e598ecdebb 100644 --- a/boto/__init__.py +++ b/boto/__init__.py @@ -1102,7 +1102,7 @@ def connect_machinelearning(aws_access_key_id=None, def storage_uri(uri_str, default_scheme='file', debug=0, validate=True, bucket_storage_uri_class=BucketStorageUri, suppress_consec_slashes=True, is_latest=False): - """ + r""" Instantiate a StorageUri from a URI string. :type uri_str: string diff --git a/boto/connection.py b/boto/connection.py index 8ffc2019b2..4131223430 100644 --- a/boto/connection.py +++ b/boto/connection.py @@ -668,10 +668,10 @@ def handle_proxy(self, proxy, proxy_port, proxy_user, proxy_pass): self.proxy_pass = proxy_pass if 'http_proxy' in os.environ and not self.proxy: pattern = re.compile( - '(?:http://)?' - '(?:(?P[\w\-\.]+):(?P.*)@)?' - '(?P[\w\-\.]+)' - '(?::(?P\d+))?' + r'(?:http://)?' + r'(?:(?P[\w\-\.]+):(?P.*)@)?' + r'(?P[\w\-\.]+)' + r'(?::(?P\d+))?' ) match = pattern.match(os.environ['http_proxy']) if match: diff --git a/boto/https_connection.py b/boto/https_connection.py index f08918c2e7..121ddde8c9 100644 --- a/boto/https_connection.py +++ b/boto/https_connection.py @@ -77,7 +77,7 @@ def ValidateCertificateHostname(cert, hostname): "validating server certificate: hostname=%s, certificate hosts=%s", hostname, hosts) for host in hosts: - host_re = host.replace('.', '\.').replace('*', '[^.]*') + host_re = host.replace('.', r'\.').replace('*', '[^.]*') if re.search('^%s$' % (host_re,), hostname, re.I): return True return False diff --git a/boto/pyami/config.py b/boto/pyami/config.py index e0b6e2f362..2ff6e78e8a 100644 --- a/boto/pyami/config.py +++ b/boto/pyami/config.py @@ -95,7 +95,7 @@ def load_credential_file(self, path): def load_from_path(self, path): file = open(path) for line in file.readlines(): - match = re.match("^#import[\s\t]*([^\s^\t]*)[\s\t]*$", line) + match = re.match(r"^#import[\s\t]*([^\s^\t]*)[\s\t]*$", line) if match: extended_file = match.group(1) (dir, file) = os.path.split(path)