##// END OF EJS Templates
Fix several DeprecationWarning: invalid escape sequence...
Mickaël Schoentgen -
Show More
@@ -82,7 +82,7 b' ipython_savefig_dir:'
82 Sphinx source directory. The default is `html_static_path`.
82 Sphinx source directory. The default is `html_static_path`.
83 ipython_rgxin:
83 ipython_rgxin:
84 The compiled regular expression to denote the start of IPython input
84 The compiled regular expression to denote the start of IPython input
85 lines. The default is ``re.compile('In \[(\d+)\]:\s?(.*)\s*')``. You
85 lines. The default is ``re.compile('In \\[(\\d+)\\]:\\s?(.*)\\s*')``. You
86 shouldn't need to change this.
86 shouldn't need to change this.
87 ipython_warning_is_error: [default to True]
87 ipython_warning_is_error: [default to True]
88 Fail the build if something unexpected happen, for example if a block raise
88 Fail the build if something unexpected happen, for example if a block raise
@@ -90,7 +90,7 b' ipython_warning_is_error: [default to True]'
90 what is considered strict, may change between the sphinx directive version.
90 what is considered strict, may change between the sphinx directive version.
91 ipython_rgxout:
91 ipython_rgxout:
92 The compiled regular expression to denote the start of IPython output
92 The compiled regular expression to denote the start of IPython output
93 lines. The default is ``re.compile('Out\[(\d+)\]:\s?(.*)\s*')``. You
93 lines. The default is ``re.compile('Out\\[(\\d+)\\]:\\s?(.*)\\s*')``. You
94 shouldn't need to change this.
94 shouldn't need to change this.
95 ipython_promptin:
95 ipython_promptin:
96 The string to represent the IPython input prompt in the generated ReST.
96 The string to represent the IPython input prompt in the generated ReST.
@@ -1047,9 +1047,9 b' def setup(app):'
1047 app.add_config_value('ipython_savefig_dir', 'savefig', 'env')
1047 app.add_config_value('ipython_savefig_dir', 'savefig', 'env')
1048 app.add_config_value('ipython_warning_is_error', True, 'env')
1048 app.add_config_value('ipython_warning_is_error', True, 'env')
1049 app.add_config_value('ipython_rgxin',
1049 app.add_config_value('ipython_rgxin',
1050 re.compile('In \[(\d+)\]:\s?(.*)\s*'), 'env')
1050 re.compile(r'In \[(\d+)\]:\s?(.*)\s*'), 'env')
1051 app.add_config_value('ipython_rgxout',
1051 app.add_config_value('ipython_rgxout',
1052 re.compile('Out\[(\d+)\]:\s?(.*)\s*'), 'env')
1052 re.compile(r'Out\[(\d+)\]:\s?(.*)\s*'), 'env')
1053 app.add_config_value('ipython_promptin', 'In [%d]:', 'env')
1053 app.add_config_value('ipython_promptin', 'In [%d]:', 'env')
1054 app.add_config_value('ipython_promptout', 'Out[%d]:', 'env')
1054 app.add_config_value('ipython_promptout', 'Out[%d]:', 'env')
1055
1055
@@ -26,7 +26,7 b' def test_debug_magic_passes_through_generators():'
26 """
26 """
27 import pexpect
27 import pexpect
28 import re
28 import re
29 in_prompt = re.compile(b'In ?\[\\d+\]:')
29 in_prompt = re.compile(br'In ?\[\d+\]:')
30 ipdb_prompt = 'ipdb>'
30 ipdb_prompt = 'ipdb>'
31 env = os.environ.copy()
31 env = os.environ.copy()
32 child = pexpect.spawn(sys.executable, ['-m', 'IPython', '--colors=nocolor', '--simple-prompt'],
32 child = pexpect.spawn(sys.executable, ['-m', 'IPython', '--colors=nocolor', '--simple-prompt'],
@@ -105,7 +105,7 b' class ApiDocWriter(object):'
105 if *package_name* is ``sphinx``, then ``sphinx.util`` will
105 if *package_name* is ``sphinx``, then ``sphinx.util`` will
106 result in ``.util`` being passed for earching by these
106 result in ``.util`` being passed for earching by these
107 regexps. If is None, gives default. Default is:
107 regexps. If is None, gives default. Default is:
108 ['\.tests$']
108 ['\\.tests$']
109 module_skip_patterns : None or sequence
109 module_skip_patterns : None or sequence
110 Sequence of strings giving URIs of modules to be excluded
110 Sequence of strings giving URIs of modules to be excluded
111 Operates on the module name including preceding URI path,
111 Operates on the module name including preceding URI path,
@@ -113,7 +113,7 b' class ApiDocWriter(object):'
113 ``sphinx.util.console`` results in the string to search of
113 ``sphinx.util.console`` results in the string to search of
114 ``.util.console``
114 ``.util.console``
115 If is None, gives default. Default is:
115 If is None, gives default. Default is:
116 ['\.setup$', '\._']
116 ['\\.setup$', '\\._']
117 names_from__all__ : set, optional
117 names_from__all__ : set, optional
118 Modules listed in here will be scanned by doing ``from mod import *``,
118 Modules listed in here will be scanned by doing ``from mod import *``,
119 rather than finding function and class definitions by scanning the
119 rather than finding function and class definitions by scanning the
@@ -355,7 +355,7 b' class ApiDocWriter(object):'
355 >>> mods = dw.discover_modules()
355 >>> mods = dw.discover_modules()
356 >>> 'sphinx.util' in mods
356 >>> 'sphinx.util' in mods
357 True
357 True
358 >>> dw.package_skip_patterns.append('\.util$')
358 >>> dw.package_skip_patterns.append('\\.util$')
359 >>> 'sphinx.util' in dw.discover_modules()
359 >>> 'sphinx.util' in dw.discover_modules()
360 False
360 False
361 >>>
361 >>>
@@ -270,7 +270,7 b' class build_scripts_entrypt(build_scripts):'
270 # Write .cmd wrappers for Windows so 'ipython' etc. work at the
270 # Write .cmd wrappers for Windows so 'ipython' etc. work at the
271 # command line
271 # command line
272 cmd_file = os.path.join(self.build_dir, name + '.cmd')
272 cmd_file = os.path.join(self.build_dir, name + '.cmd')
273 cmd = '@"{python}" "%~dp0\{script}" %*\r\n'.format(
273 cmd = r'@"{python}" "%~dp0\{script}" %*\r\n'.format(
274 python=sys.executable, script=name)
274 python=sys.executable, script=name)
275 log.info("Writing %s wrapper script" % cmd_file)
275 log.info("Writing %s wrapper script" % cmd_file)
276 with open(cmd_file, 'w') as f:
276 with open(cmd_file, 'w') as f:
@@ -358,7 +358,7 b' def git_prebuild(pkg_dir, build_cmd=build_py):'
358 def run(self):
358 def run(self):
359 # loose as `.dev` is suppose to be invalid
359 # loose as `.dev` is suppose to be invalid
360 print("check version number")
360 print("check version number")
361 loose_pep440re = re.compile('^(\d+)\.(\d+)\.(\d+((a|b|rc)\d+)?)(\.post\d+)?(\.dev\d*)?$')
361 loose_pep440re = re.compile(r'^(\d+)\.(\d+)\.(\d+((a|b|rc)\d+)?)(\.post\d+)?(\.dev\d*)?$')
362 if not loose_pep440re.match(version):
362 if not loose_pep440re.match(version):
363 raise ValueError("Version number '%s' is not valid (should match [N!]N(.N)*[{a|b|rc}N][.postN][.devN])" % version)
363 raise ValueError("Version number '%s' is not valid (should match [N!]N(.N)*[{a|b|rc}N][.postN][.devN])" % version)
364
364
General Comments 0
You need to be logged in to leave comments. Login now