File: use-raw-strings.patch

package info (click to toggle)
python-ruffus 2.8.4-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,492 kB
  • sloc: python: 17,613; makefile: 213; sh: 18
file content (539 lines) | stat: -rw-r--r-- 31,583 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
From: Ananthu C V <weepingclown@debian.org>
Date: Sun, 8 Mar 2026 11:17:36 +0100
Subject: use raw strings to avoid syntax warnings

Last-Update: 2024-12-05
---
 doc/conf.py                                       |  2 +-
 ruffus/cmdline.py                                 |  6 ++---
 ruffus/combinatorics.py                           |  2 +-
 ruffus/parse_old_style_ruffus.py                  |  6 ++---
 ruffus/proxy_logger.py                            |  4 ++--
 ruffus/ruffus_utility.py                          |  2 +-
 ruffus/test/test_combinatorics.py                 | 28 +++++++++++------------
 ruffus/test/test_file_name_parameters.py          | 14 ++++++------
 ruffus/test/test_newstyle_combinatorics.py        | 28 +++++++++++------------
 ruffus/test/test_newstyle_regex_error_messages.py | 20 ++++++++--------
 ruffus/test/test_regex_error_messages.py          | 20 ++++++++--------
 ruffus/test/test_ruffus_utility.py                |  2 +-
 12 files changed, 67 insertions(+), 67 deletions(-)

diff --git a/doc/conf.py b/doc/conf.py
index 0b9cea2..37bf632 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -65,7 +65,7 @@ copyright = u'2009-2019 cgat-developers'
 version=ruffus.ruffus_version.__version #major.minor[.patch[.sub]]
 # The full version, without betaincluding alpha/beta/rc tags.
 import re
-release = re.subn("([\d\.]+).*", r"\1", version)[0]
+release = re.subn(r"([\d\.]+).*", r"\1", version)[0]
 print(version, release)
 
 
diff --git a/ruffus/cmdline.py b/ruffus/cmdline.py
index 46d39bc..6928035 100644
--- a/ruffus/cmdline.py
+++ b/ruffus/cmdline.py
@@ -665,7 +665,7 @@ def get_extra_options_appropriate_for_command(appropriate_option_names, extra_op
 
 # _________________________________________________________________________________________
 def handle_verbose(options):
-    """
+    r"""
     raw options.verbose is a list of specifiers
          '+'         : i.e. --verbose. This just increases the current verbosity value by 1
          '\d+'       : e.g. --verbose 6. This (re)sets the verbosity value
@@ -704,8 +704,8 @@ def handle_verbose(options):
     #
     #   Each verbosity specifier can be
     #       '+'         : i.e. --verbose. This just increases the current verbosity value by 1
-    #       '\d+'       : e.g. --verbose 6. This (re)sets the verbosity value
-    #       '\d+:\d+'   : e.g. --verbose 7:-5 The second number is the verbose_abbreviated_path
+    #       r'\d+'       : e.g. --verbose 6. This (re)sets the verbosity value
+    #       r'\d+:\d+'   : e.g. --verbose 7:-5 The second number is the verbose_abbreviated_path
     #
     for vv in options.verbose:
         mm = match_regex.match(vv)
diff --git a/ruffus/combinatorics.py b/ruffus/combinatorics.py
index 2aeed35..b2f2826 100644
--- a/ruffus/combinatorics.py
+++ b/ruffus/combinatorics.py
@@ -23,7 +23,7 @@
 #   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 #   THE SOFTWARE.
 #################################################################################
-"""
+r"""
 
 ********************************************
 :mod:`ruffus.combinatorics` -- Overview
diff --git a/ruffus/parse_old_style_ruffus.py b/ruffus/parse_old_style_ruffus.py
index 8559c72..6ad84b8 100755
--- a/ruffus/parse_old_style_ruffus.py
+++ b/ruffus/parse_old_style_ruffus.py
@@ -175,7 +175,7 @@ if __name__ == '__main__':
 
 # 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
 
-func_re = re.compile("^\s*def.*\(")
+func_re = re.compile(r"^\s*def.*\(")
 
 
 def get_decorators(line_num, decorated_lines, all_lines):
@@ -192,8 +192,8 @@ def get_decorators(line_num, decorated_lines, all_lines):
     raise Exception("Unterminated decorators %s" % (decorated_lines,))
 
 
-decorator_re = re.compile("^\s*@")
-no_white_space_re = re.compile("^[^#\s]")
+decorator_re = re.compile(r"^\s*@")
+no_white_space_re = re.compile(r"^[^#\s]")
 if __name__ == '__main__':
     line_num = 1
     last_decorated_line_num = 1
diff --git a/ruffus/proxy_logger.py b/ruffus/proxy_logger.py
index 539ed9f..0b4830a 100644
--- a/ruffus/proxy_logger.py
+++ b/ruffus/proxy_logger.py
@@ -23,7 +23,7 @@
 #   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 #   THE SOFTWARE.
 #################################################################################
-"""
+r"""
 ****************************************************************************
 Create proxy for logging for use with multiprocessing
 ****************************************************************************
@@ -320,7 +320,7 @@ class LoggingManager(multiprocessing.managers.SyncManager):
 
 
 def make_shared_logger_and_proxy(logger_factory, logger_name, args):
-    """
+    r"""
     Make a `logging <http://docs.python.org/library/logging.html>`_ object
     called "\ ``logger_name``\ " by calling ``logger_factory``\ (``args``\ )
 
diff --git a/ruffus/ruffus_utility.py b/ruffus/ruffus_utility.py
index 168c196..30c8af9 100644
--- a/ruffus/ruffus_utility.py
+++ b/ruffus/ruffus_utility.py
@@ -499,7 +499,7 @@ def regex_matches_as_dict(test_str, compiled_regex):
 #
 # _________________________________________________________________________________________
 def path_decomposition_regex_match(test_str, compiled_regex):
-    """
+    r"""
     Returns a dictionary identifying the components of a file path.
 
     This includes both the components of a path:
diff --git a/ruffus/test/test_combinatorics.py b/ruffus/test/test_combinatorics.py
index 6b3e198..ef3245c 100755
--- a/ruffus/test/test_combinatorics.py
+++ b/ruffus/test/test_combinatorics.py
@@ -385,10 +385,10 @@ class TestCombinatorics(unittest.TestCase):
         pipeline_printout(s, [check_product_merged_task],
                           verbose=5, wrap_width=10000, pipeline="main")
         self.assertTrue(re.search('Job needs update:.*Missing files.*'
-                                  '\[.*{tempdir}/a_name.tmp1, '
+                                  r'\[.*{tempdir}/a_name.tmp1, '
                                   '.*{tempdir}/e_name.tmp1, '
                                   '.*{tempdir}/h_name.tmp1, '
-                                  '.*{tempdir}/a_name.e_name.h_name.tmp2\]'.format(tempdir=tempdir), s.getvalue(), re.DOTALL))
+                                  r'.*{tempdir}/a_name.e_name.h_name.tmp2\]'.format(tempdir=tempdir), s.getvalue(), re.DOTALL))
 
     def test_product_run(self):
         """Run product"""
@@ -460,9 +460,9 @@ class TestCombinatorics(unittest.TestCase):
         pipeline_printout(s, [check_combinations2_merged_task],
                           verbose=5, wrap_width=10000, pipeline="main")
         self.assertTrue(re.search('Job needs update:.*Missing files.*'
-                                  '\[.*{tempdir}/a_name.tmp1, '
+                                  r'\[.*{tempdir}/a_name.tmp1, '
                                   '.*{tempdir}/b_name.tmp1, '
-                                  '.*{tempdir}/a_name.b_name.tmp2\]'.format(tempdir=tempdir), s.getvalue(), re.DOTALL))
+                                  r'.*{tempdir}/a_name.b_name.tmp2\]'.format(tempdir=tempdir), s.getvalue(), re.DOTALL))
 
     def test_combinations2_run(self):
         """Run product"""
@@ -486,10 +486,10 @@ class TestCombinatorics(unittest.TestCase):
         pipeline_printout(s, [check_combinations3_merged_task],
                           verbose=5, wrap_width=10000, pipeline="main")
         self.assertTrue(re.search(
-            '\[.*{tempdir}/a_name.tmp1, '
+            r'\[.*{tempdir}/a_name.tmp1, '
             '.*{tempdir}/b_name.tmp1, '
             '.*{tempdir}/c_name.tmp1, '
-            '.*{tempdir}/a_name.b_name.c_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
+            r'.*{tempdir}/a_name.b_name.c_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
 
     def test_combinations3_run(self):
         """Run product"""
@@ -513,9 +513,9 @@ class TestCombinatorics(unittest.TestCase):
         s = StringIO()
         pipeline_printout(s, [check_permutations2_merged_task],
                           verbose=5, wrap_width=10000, pipeline="main")
-        self.assertTrue(re.search('\[.*{tempdir}/a_name.tmp1, '
+        self.assertTrue(re.search(r'\[.*{tempdir}/a_name.tmp1, '
                                   '.*{tempdir}/b_name.tmp1, '
-                                  '.*{tempdir}/a_name.b_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
+                                  r'.*{tempdir}/a_name.b_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
 
     def test_permutations2_run(self):
         """Run product"""
@@ -538,10 +538,10 @@ class TestCombinatorics(unittest.TestCase):
         s = StringIO()
         pipeline_printout(s, [check_permutations3_merged_task],
                           verbose=5, wrap_width=10000, pipeline="main")
-        self.assertTrue(re.search('\[.*{tempdir}/a_name.tmp1, '
+        self.assertTrue(re.search(r'\[.*{tempdir}/a_name.tmp1, '
                                   '.*{tempdir}/b_name.tmp1, '
                                   '.*{tempdir}/c_name.tmp1, '
-                                  '.*{tempdir}/a_name.b_name.c_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
+                                  r'.*{tempdir}/a_name.b_name.c_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
 
     def test_permutations3_run(self):
         """Run product"""
@@ -565,9 +565,9 @@ class TestCombinatorics(unittest.TestCase):
         s = StringIO()
         pipeline_printout(s, [check_combinations_with_replacement2_merged_task],
                           verbose=5, wrap_width=10000, pipeline="main")
-        self.assertTrue(re.search('\[.*{tempdir}/a_name.tmp1, '
+        self.assertTrue(re.search(r'\[.*{tempdir}/a_name.tmp1, '
                                   '.*{tempdir}/b_name.tmp1, '
-                                  '.*{tempdir}/a_name.b_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
+                                  r'.*{tempdir}/a_name.b_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
 
     def test_combinations_with_replacement2_run(self):
         """Run product"""
@@ -590,10 +590,10 @@ class TestCombinatorics(unittest.TestCase):
         s = StringIO()
         pipeline_printout(s, [check_combinations_with_replacement3_merged_task],
                           verbose=5, wrap_width=10000, pipeline="main")
-        self.assertTrue(re.search('\[.*{tempdir}/a_name.tmp1, '
+        self.assertTrue(re.search(r'\[.*{tempdir}/a_name.tmp1, '
                                   '.*{tempdir}/b_name.tmp1, '
                                   '.*{tempdir}/c_name.tmp1, '
-                                  '.*{tempdir}/a_name.b_name.c_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
+                                  r'.*{tempdir}/a_name.b_name.c_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
 
     def test_combinations_with_replacement3_run(self):
         """Run product"""
diff --git a/ruffus/test/test_file_name_parameters.py b/ruffus/test/test_file_name_parameters.py
index e805a6a..22cf06a 100755
--- a/ruffus/test/test_file_name_parameters.py
+++ b/ruffus/test/test_file_name_parameters.py
@@ -797,7 +797,7 @@ class Test_transform_param_factory(unittest.TestCase):
         # simple 1 input, 1 output
         #
         unnamed_args = [tempdir + "/*.test",
-                        task.formatter("/(?P<name>\w+).test$"),
+                        task.formatter(r"/(?P<name>\w+).test$"),
                         ["{path[0]}/{name[0]}.output1{ext[0]}", "{path[0]}/{name[0]}.output2"], "{path[0]}/{name[0]}.output3"]
         expected_results = [
             ('DIR/f0.test', ['DIR/f0.output1.test',
@@ -1589,9 +1589,9 @@ class Test_product_param_factory(unittest.TestCase):
         # simple 1 input, 1 output
         #
         args = [[tempdir + "/a.test1", tempdir + "/b.test1"],
-                task.formatter("(?:.+/)?(?P<ID>\w+)\.(.+)"),
+                task.formatter(r"(?:.+/)?(?P<ID>\w+)\.(.+)"),
                 [tempdir + "/c.test2", tempdir + "/d.test2", tempdir + "/e.ignore"],
-                task.formatter("(?:.+/)?(?P<ID>\w+)\.(test2)"),
+                task.formatter(r"(?:.+/)?(?P<ID>\w+)\.(test2)"),
                 r"{path[0][0]}/{ID[0][0]}.{1[1][0]}.output"]
         expected_result = [
             (('DIR/a.test1', 'DIR/c.test2'), 'DIR/a.c.output'),
@@ -1630,9 +1630,9 @@ class Test_product_param_factory(unittest.TestCase):
         # (replace) inputs
         #
         #
-        paths = self.do_task_product([tempdir + "/a.test1", tempdir + "/b.test1"],                          task.formatter("(?:.+/)?(?P<ID>\w+)\.(.+)"),
+        paths = self.do_task_product([tempdir + "/a.test1", tempdir + "/b.test1"],                          task.formatter(r"(?:.+/)?(?P<ID>\w+)\.(.+)"),
                                      [tempdir + "/c.test2", tempdir + "/d.test2", tempdir +
-                                         "/e.ignore"], task.formatter("(?:.+/)?(?P<ID>\w+)\.(test2)"),
+                                         "/e.ignore"], task.formatter(r"(?:.+/)?(?P<ID>\w+)\.(test2)"),
                                      task.inputs(
                                          ("{path[0][0]}/{basename[0][0]}.testwhat1", "{path[1][0]}/{basename[1][0]}.testwhat2")),
                                      r"{path[0][0]}/{ID[0][0]}.{1[1][0]}.output")
@@ -1649,9 +1649,9 @@ class Test_product_param_factory(unittest.TestCase):
         # add inputs
         #
         #
-        paths = self.do_task_product([tempdir + "/a.test1", tempdir + "/b.test1"],                          task.formatter("(?:.+/)?(?P<ID>\w+)\.(.+)"),
+        paths = self.do_task_product([tempdir + "/a.test1", tempdir + "/b.test1"],                          task.formatter(r"(?:.+/)?(?P<ID>\w+)\.(.+)"),
                                      [tempdir + "/c.test2", tempdir + "/d.test2", tempdir +
-                                         "/e.ignore"], task.formatter("(?:.+/)?(?P<ID>\w+)\.(test2)"),
+                                         "/e.ignore"], task.formatter(r"(?:.+/)?(?P<ID>\w+)\.(test2)"),
                                      add_inputs(
                                          "{path[0][0]}/{basename[0][0]}.testwhat1", "{path[1][0]}/{basename[1][0]}.testwhat2", ),
                                      r"{path[0][0]}/{ID[0][0]}.{1[1][0]}.output")
diff --git a/ruffus/test/test_newstyle_combinatorics.py b/ruffus/test/test_newstyle_combinatorics.py
index 35af678..713e92a 100755
--- a/ruffus/test/test_newstyle_combinatorics.py
+++ b/ruffus/test/test_newstyle_combinatorics.py
@@ -397,10 +397,10 @@ class TestCombinatorics(unittest.TestCase):
         test_pipeline2.printout(
             s, [check_product_merged_task], verbose=5, wrap_width=10000)
         self.assertTrue(re.search('Job needs update:.*Missing files.*'
-                                  '\[.*{tempdir}/a_name.tmp1, '
+                                  r'\[.*{tempdir}/a_name.tmp1, '
                                   '.*{tempdir}/e_name.tmp1, '
                                   '.*{tempdir}/h_name.tmp1, '
-                                  '.*{tempdir}/a_name.e_name.h_name.tmp2\]'.format(tempdir=tempdir), s.getvalue(), re.DOTALL))
+                                  r'.*{tempdir}/a_name.e_name.h_name.tmp2\]'.format(tempdir=tempdir), s.getvalue(), re.DOTALL))
 
     def test_product_run(self):
         """Run product"""
@@ -471,9 +471,9 @@ class TestCombinatorics(unittest.TestCase):
         test_pipeline1.printout(
             s, [check_combinations2_merged_task], verbose=5, wrap_width=10000)
         self.assertTrue(re.search('Job needs update:.*Missing files.*'
-                                  '\[.*{tempdir}/a_name.tmp1, '
+                                  r'\[.*{tempdir}/a_name.tmp1, '
                                   '.*{tempdir}/b_name.tmp1, '
-                                  '.*{tempdir}/a_name.b_name.tmp2\]'.format(tempdir=tempdir), s.getvalue(), re.DOTALL))
+                                  r'.*{tempdir}/a_name.b_name.tmp2\]'.format(tempdir=tempdir), s.getvalue(), re.DOTALL))
 
     def test_combinations2_run(self):
         """Run product"""
@@ -497,10 +497,10 @@ class TestCombinatorics(unittest.TestCase):
         test_pipeline2.printout(
             s, [check_combinations3_merged_task], verbose=5, wrap_width=10000)
         self.assertTrue(re.search(
-            '\[.*{tempdir}/a_name.tmp1, '
+            r'\[.*{tempdir}/a_name.tmp1, '
             '.*{tempdir}/b_name.tmp1, '
             '.*{tempdir}/c_name.tmp1, '
-            '.*{tempdir}/a_name.b_name.c_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
+            r'.*{tempdir}/a_name.b_name.c_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
 
     def test_combinations3_run(self):
         """Run product"""
@@ -524,9 +524,9 @@ class TestCombinatorics(unittest.TestCase):
         s = StringIO()
         test_pipeline2.printout(
             s, [check_permutations2_merged_task], verbose=5, wrap_width=10000)
-        self.assertTrue(re.search('\[.*{tempdir}/a_name.tmp1, '
+        self.assertTrue(re.search(r'\[.*{tempdir}/a_name.tmp1, '
                                   '.*{tempdir}/b_name.tmp1, '
-                                  '.*{tempdir}/a_name.b_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
+                                  r'.*{tempdir}/a_name.b_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
 
     def test_permutations2_run(self):
         """Run product"""
@@ -549,10 +549,10 @@ class TestCombinatorics(unittest.TestCase):
         s = StringIO()
         test_pipeline2.printout(
             s, [check_permutations3_merged_task], verbose=5, wrap_width=10000)
-        self.assertTrue(re.search('\[.*{tempdir}/a_name.tmp1, '
+        self.assertTrue(re.search(r'\[.*{tempdir}/a_name.tmp1, '
                                   '.*{tempdir}/b_name.tmp1, '
                                   '.*{tempdir}/c_name.tmp1, '
-                                  '.*{tempdir}/a_name.b_name.c_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
+                                  r'.*{tempdir}/a_name.b_name.c_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
 
     def test_permutations3_run(self):
         """Run product"""
@@ -576,9 +576,9 @@ class TestCombinatorics(unittest.TestCase):
         s = StringIO()
         test_pipeline2.printout(
             s, [check_combinations_with_replacement2_merged_task], verbose=5, wrap_width=10000)
-        self.assertTrue(re.search('\[.*{tempdir}/a_name.tmp1, '
+        self.assertTrue(re.search(r'\[.*{tempdir}/a_name.tmp1, '
                                   '.*{tempdir}/b_name.tmp1, '
-                                  '.*{tempdir}/a_name.b_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
+                                  r'.*{tempdir}/a_name.b_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
 
     def test_combinations_with_replacement2_run(self):
         """Run product"""
@@ -601,10 +601,10 @@ class TestCombinatorics(unittest.TestCase):
         s = StringIO()
         test_pipeline2.printout(
             s, [check_combinations_with_replacement3_merged_task], verbose=5, wrap_width=10000)
-        self.assertTrue(re.search('\[.*{tempdir}/a_name.tmp1, '
+        self.assertTrue(re.search(r'\[.*{tempdir}/a_name.tmp1, '
                                   '.*{tempdir}/b_name.tmp1, '
                                   '.*{tempdir}/c_name.tmp1, '
-                                  '.*{tempdir}/a_name.b_name.c_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
+                                  r'.*{tempdir}/a_name.b_name.c_name.tmp2\]'.format(tempdir=tempdir), s.getvalue()))
 
     def test_combinations_with_replacement3_run(self):
         """Run product"""
diff --git a/ruffus/test/test_newstyle_regex_error_messages.py b/ruffus/test/test_newstyle_regex_error_messages.py
index a10cfa7..b1e7446 100755
--- a/ruffus/test/test_newstyle_regex_error_messages.py
+++ b/ruffus/test/test_newstyle_regex_error_messages.py
@@ -307,7 +307,7 @@ class Test_regex_error_messages(unittest.TestCase):
         test_pipeline.printout(s, [check_regex_task],
                                verbose=5, wrap_width=10000)
         self.assertTrue(re.search(
-            'Missing files.*\[{tempdir}/a_name.tmp1, {tempdir}/a_name.tmp2'.format(tempdir=tempdir), s.getvalue(), re.DOTALL))
+            r'Missing files.*\[{tempdir}/a_name.tmp1, {tempdir}/a_name.tmp2'.format(tempdir=tempdir), s.getvalue(), re.DOTALL))
 
     def test_regex_run(self):
         """Run transform(...,regex()...)"""
@@ -349,7 +349,7 @@ class Test_regex_error_messages(unittest.TestCase):
         test_pipeline.printout(
             s, [check_suffix_task], verbose=5, wrap_width=10000)
         self.assertTrue(re.search(
-            'Missing files.*\[{tempdir}/a_name.tmp1, {tempdir}/a_name.tmp2'.format(tempdir=tempdir), s.getvalue(), re.DOTALL))
+            r'Missing files.*\[{tempdir}/a_name.tmp1, {tempdir}/a_name.tmp2'.format(tempdir=tempdir), s.getvalue(), re.DOTALL))
 
     def test_suffix_run(self):
         """Run transform(...,suffix()...)"""
@@ -367,12 +367,12 @@ class Test_regex_error_messages(unittest.TestCase):
         cleanup_tmpdir()
         s = StringIO()
         self.assertRaisesRegex(fatal_error_input_file_does_not_match,
-                               "File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*invalid group reference",
+                               r"File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*invalid group reference",
                                pipeline_printout,
                                s, [check_suffix_unmatched_task],
                                verbose=3)
         self.assertRaisesRegex(RethrownJobError,
-                               "File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*invalid group reference",
+                               r"File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*invalid group reference",
                                test_pipeline.run,
                                [check_suffix_unmatched_task], verbose=0, multiprocess=parallelism)
 
@@ -406,12 +406,12 @@ class Test_regex_error_messages(unittest.TestCase):
         cleanup_tmpdir()
         s = StringIO()
         self.assertRaisesRegex(fatal_error_input_file_does_not_match,
-                               "File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*unknown group name",
+                               r"File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*unknown group name",
                                test_pipeline.printout,
                                s, [check_regex_misspelt_capture_error_task],
                                verbose=3)
         self.assertRaisesRegex(RethrownJobError,
-                               "File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*unknown group name",
+                               r"File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*unknown group name",
                                test_pipeline.run,
                                [check_regex_misspelt_capture_error_task], verbose=0)
 
@@ -423,12 +423,12 @@ class Test_regex_error_messages(unittest.TestCase):
         cleanup_tmpdir()
         s = StringIO()
         self.assertRaisesRegex(fatal_error_input_file_does_not_match,
-                               "File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*unknown group name",
+                               r"File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*unknown group name",
                                test_pipeline.printout,
                                s, [check_regex_misspelt_capture2_error_task],
                                verbose=3)
         self.assertRaisesRegex(RethrownJobError,
-                               "File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*unknown group name",
+                               r"File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*unknown group name",
                                test_pipeline.run,
                                [check_regex_misspelt_capture2_error_task], verbose=0, multiprocess=parallelism)
 
@@ -441,12 +441,12 @@ class Test_regex_error_messages(unittest.TestCase):
         cleanup_tmpdir()
         s = StringIO()
         self.assertRaisesRegex(fatal_error_input_file_does_not_match,
-                               "File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*invalid group reference",
+                               r"File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*invalid group reference",
                                test_pipeline.printout,
                                s, [check_regex_out_of_range_regex_reference_error_task],
                                verbose=3)
         self.assertRaisesRegex(RethrownJobError,
-                               "File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*invalid group reference",
+                               r"File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*invalid group reference",
                                test_pipeline.run,
                                [check_regex_out_of_range_regex_reference_error_task], verbose=0, multiprocess=parallelism)
 
diff --git a/ruffus/test/test_regex_error_messages.py b/ruffus/test/test_regex_error_messages.py
index b744aae..012e896 100755
--- a/ruffus/test/test_regex_error_messages.py
+++ b/ruffus/test/test_regex_error_messages.py
@@ -299,7 +299,7 @@ class Test_regex_error_messages(unittest.TestCase):
         pipeline_printout(s, [check_regex_task], verbose=5,
                           wrap_width=10000, pipeline="main")
         self.assertTrue(re.search(
-            'Missing files.*\[{tempdir}a_name.tmp1, {tempdir}a_name.tmp2'.format(tempdir=tempdir), s.getvalue(), re.DOTALL))
+            r'Missing files.*\[{tempdir}a_name.tmp1, {tempdir}a_name.tmp2'.format(tempdir=tempdir), s.getvalue(), re.DOTALL))
 
     def test_regex_run(self):
         """Run transform(...,regex()...)"""
@@ -341,7 +341,7 @@ class Test_regex_error_messages(unittest.TestCase):
         pipeline_printout(s, [check_suffix_task], verbose=5,
                           wrap_width=10000, pipeline="main")
         self.assertTrue(re.search(
-            'Missing files.*\[{tempdir}a_name.tmp1, {tempdir}a_name.tmp2'.format(tempdir=tempdir), s.getvalue(), re.DOTALL))
+            r'Missing files.*\[{tempdir}a_name.tmp1, {tempdir}a_name.tmp2'.format(tempdir=tempdir), s.getvalue(), re.DOTALL))
 
     def test_suffix_run(self):
         """Run transform(...,suffix()...)"""
@@ -359,12 +359,12 @@ class Test_regex_error_messages(unittest.TestCase):
         cleanup_tmpdir()
         s = StringIO()
         self.assertRaisesRegex(fatal_error_input_file_does_not_match,
-                               "File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*invalid group reference",
+                               r"File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*invalid group reference",
                                pipeline_printout,
                                s, [check_suffix_unmatched_task],
                                verbose=3)
         self.assertRaisesRegex(RethrownJobError,
-                               "File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*invalid group reference",
+                               r"File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*invalid group reference",
                                pipeline_run,
                                [check_suffix_unmatched_task], verbose=0, multiprocess=parallelism)
 
@@ -398,12 +398,12 @@ class Test_regex_error_messages(unittest.TestCase):
         cleanup_tmpdir()
         s = StringIO()
         self.assertRaisesRegex(fatal_error_input_file_does_not_match,
-                               "File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*unknown group name",
+                               r"File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*unknown group name",
                                pipeline_printout,
                                s, [check_regex_misspelt_capture_error_task],
                                verbose=3)
         self.assertRaisesRegex(RethrownJobError,
-                               "File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*unknown group name",
+                               r"File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*unknown group name",
                                pipeline_run,
                                [check_regex_misspelt_capture_error_task], verbose=0)
 
@@ -415,12 +415,12 @@ class Test_regex_error_messages(unittest.TestCase):
         cleanup_tmpdir()
         s = StringIO()
         self.assertRaisesRegex(fatal_error_input_file_does_not_match,
-                               "File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*unknown group name",
+                               r"File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*unknown group name",
                                pipeline_printout,
                                s, [check_regex_misspelt_capture2_error_task],
                                verbose=3)
         self.assertRaisesRegex(RethrownJobError,
-                               "File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*unknown group name",
+                               r"File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*unknown group name",
                                pipeline_run,
                                [check_regex_misspelt_capture2_error_task], verbose=0, multiprocess=parallelism)
 
@@ -433,12 +433,12 @@ class Test_regex_error_messages(unittest.TestCase):
         cleanup_tmpdir()
         s = StringIO()
         self.assertRaisesRegex(fatal_error_input_file_does_not_match,
-                               "File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*invalid group reference",
+                               r"File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*invalid group reference",
                                pipeline_printout,
                                s, [check_regex_out_of_range_regex_reference_error_task],
                                verbose=3)
         self.assertRaisesRegex(RethrownJobError,
-                               "File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*invalid group reference",
+                               r"File '.*?' does not match regex\('.*?'\) and pattern '.*?':\n.*invalid group reference",
                                pipeline_run,
                                [check_regex_out_of_range_regex_reference_error_task], verbose=0, multiprocess=parallelism)
 
diff --git a/ruffus/test/test_ruffus_utility.py b/ruffus/test/test_ruffus_utility.py
index 1f640cd..61269b1 100755
--- a/ruffus/test/test_ruffus_utility.py
+++ b/ruffus/test/test_ruffus_utility.py
@@ -508,7 +508,7 @@ class Test_expand_nested_tasks_or_globs(unittest.TestCase):
 
 class Test_regex_replace (unittest.TestCase):
     def helper(self, data, result):
-        regex_str = "([a-z]+)\.([a-z]+)\.([a-z]+)\.([a-z]+)"
+        regex_str = r"([a-z]+)\.([a-z]+)\.([a-z]+)\.([a-z]+)"
         try_result = regex_replace("aaa.bbb.ccc.aaa",
                                    regex_str,
                                    re.compile(regex_str),