diff --git a/IPython/core/debugger.py b/IPython/core/debugger.py index 0e0d401..4ece380 100644 --- a/IPython/core/debugger.py +++ b/IPython/core/debugger.py @@ -176,7 +176,7 @@ class Tracer(object): self.debugger.set_trace(sys._getframe().f_back) -RGX_EXTRA_INDENT = re.compile('(?<=\n)\s+') +RGX_EXTRA_INDENT = re.compile(r'(?<=\n)\s+') def strip_indentation(multiline_string): diff --git a/IPython/utils/path.py b/IPython/utils/path.py index 08806c2..f866597 100644 --- a/IPython/utils/path.py +++ b/IPython/utils/path.py @@ -202,7 +202,7 @@ def get_home_dir(require_writable=False): import _winreg as wreg # Py 2 key = wreg.OpenKey( wreg.HKEY_CURRENT_USER, - "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" + r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" ) homedir = wreg.QueryValueEx(key,'Personal')[0] key.Close() diff --git a/IPython/utils/text.py b/IPython/utils/text.py index 98d72f4..0c0d82f 100644 --- a/IPython/utils/text.py +++ b/IPython/utils/text.py @@ -588,7 +588,7 @@ class DollarFormatter(FullEvalFormatter): In [4]: f.format('$a or {b}', a=1, b=2) Out[4]: '1 or 2' """ - _dollar_pattern_ignore_single_quote = re.compile("(.*?)\$(\$?[\w\.]+)(?=([^']*'[^']*')*[^']*$)") + _dollar_pattern_ignore_single_quote = re.compile(r"(.*?)\$(\$?[\w\.]+)(?=([^']*'[^']*')*[^']*$)") def parse(self, fmt_string): for literal_txt, field_name, format_spec, conversion \ in Formatter.parse(self, fmt_string):