launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #28540
[Merge] ~cjwatson/lp-mailman:fix-W605 into lp-mailman:master
Colin Watson has proposed merging ~cjwatson/lp-mailman:fix-W605 into lp-mailman:master.
Commit message:
Fix flake8 W605 (invalid escape sequence)
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/lp-mailman/+git/lp-mailman/+merge/424016
This is unimportant, since this codebase will almost certainly never be ported to Python >= 3.6 where this form was deprecated (porting to Python 3 requires porting to Mailman 3, which involves architectural changes that will involve a near-complete rewrite anyway); but I wanted to have a trivial change to deploy so that I could easily deploy the rabbitmq configuration change in https://code.launchpad.net/~jsimpso/lp-production-configs/rabbitmq/+merge/423808.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/lp-mailman:fix-W605 into lp-mailman:master.
diff --git a/lib/lp/services/mailman/tests/test_mm_cfg.py b/lib/lp/services/mailman/tests/test_mm_cfg.py
index b9349d5..a34b5a8 100644
--- a/lib/lp/services/mailman/tests/test_mm_cfg.py
+++ b/lib/lp/services/mailman/tests/test_mm_cfg.py
@@ -144,23 +144,23 @@ class TestMMCfgLaunchpadConfigTestCase(TestCase):
self.assertTrue('-spammode' in mm_cfg.PUBLIC_EXTERNAL_ARCHIVER)
self.assertTrue('-umask 022'in mm_cfg.PUBLIC_EXTERNAL_ARCHIVER)
self.assertTextMatchesExpressionIgnoreWhitespace(
- '-dbfile /var/tmp'
- '/mailman/archives/private/%\(listname\)s.mbox/mhonarc.db',
+ r'-dbfile /var/tmp'
+ r'/mailman/archives/private/%\(listname\)s.mbox/mhonarc.db',
mm_cfg.PUBLIC_EXTERNAL_ARCHIVER)
self.assertTextMatchesExpressionIgnoreWhitespace(
- '-outdir /var/tmp/mailman/mhonarc/%\(listname\)s',
+ r'-outdir /var/tmp/mailman/mhonarc/%\(listname\)s',
mm_cfg.PUBLIC_EXTERNAL_ARCHIVER)
self.assertTextMatchesExpressionIgnoreWhitespace(
- '-definevar ML-NAME=%\(listname\)s',
+ r'-definevar ML-NAME=%\(listname\)s',
mm_cfg.PUBLIC_EXTERNAL_ARCHIVER)
self.assertTextMatchesExpressionIgnoreWhitespace(
- '-rcfile /var/tmp/mailman/data/lp-mhonarc-common.mrc',
+ r'-rcfile /var/tmp/mailman/data/lp-mhonarc-common.mrc',
mm_cfg.PUBLIC_EXTERNAL_ARCHIVER)
self.assertTextMatchesExpressionIgnoreWhitespace(
- '-stderr /var/tmp/mailman/logs/mhonarc',
+ r'-stderr /var/tmp/mailman/logs/mhonarc',
mm_cfg.PUBLIC_EXTERNAL_ARCHIVER)
self.assertTextMatchesExpressionIgnoreWhitespace(
- '-stdout /var/tmp/mailman/logs/mhonarc',
+ r'-stdout /var/tmp/mailman/logs/mhonarc',
mm_cfg.PUBLIC_EXTERNAL_ARCHIVER)
self.assertEqual(
mm_cfg.PRIVATE_EXTERNAL_ARCHIVER, mm_cfg.PUBLIC_EXTERNAL_ARCHIVER)
@@ -177,10 +177,10 @@ class TestMHonArchMRC(TestCase):
with open(mrc_path) as mrc_file:
self.mrc = mrc_file.read()
mime_excs = (
- '<MIMEExcs> '
- 'text/html '
- 'text/x-html '
- '</MIMEExcs> ')
+ r'<MIMEExcs> '
+ r'text/html '
+ r'text/x-html '
+ r'</MIMEExcs> ')
self.assertTextMatchesExpressionIgnoreWhitespace(
mime_excs, self.mrc)
diff --git a/lib/lp/testing/utilities/retest.py b/lib/lp/testing/utilities/retest.py
index 46906bc..740f063 100755
--- a/lib/lp/testing/utilities/retest.py
+++ b/lib/lp/testing/utilities/retest.py
@@ -39,10 +39,10 @@ from lp.services.config import config
TEST = os.path.join(config.root, "bin/test")
# Regular expression to match numbered stories.
-STORY_RE = re.compile("(.*)/\d{2}-.*")
+STORY_RE = re.compile(r"(.*)/\d{2}-.*")
# Regular expression to remove terminal color escapes.
-COLOR_RE = re.compile("\x1b[[][0-9;]+m")
+COLOR_RE = re.compile(r"\x1b[[][0-9;]+m")
def decolorize(text):