Skip to content

Commit

Permalink
Merge pull request #447 from frexvahi/deprecated-regexp
Browse files Browse the repository at this point in the history
Fix DeprecationWarning for invalid escape sequence in non-raw regexp
  • Loading branch information
mattbennett committed Jun 21, 2017
2 parents 714958b + 662f49a commit e489212
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nameko/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def redact(data, keys):

for variable in sensitive_variables:
keys = []
for dict_key, list_index in re.findall("(\w+)|\[(\d+)\]", variable):
for dict_key, list_index in re.findall(r"(\w+)|\[(\d+)\]", variable):
if dict_key:
keys.append(dict_key)
elif list_index:
Expand Down
2 changes: 1 addition & 1 deletion nameko/web/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


def parse_address(address_string):
address_re = re.compile('^((?P<address>[^:]+):)?(?P<port>\d+)$')
address_re = re.compile(r'^((?P<address>[^:]+):)?(?P<port>\d+)$')
match = address_re.match(address_string)
if match is None:
raise ConfigurationError(
Expand Down

0 comments on commit e489212

Please sign in to comment.