launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25800
[Merge] ~cjwatson/lp-codeimport:merge into lp-codeimport:master
Colin Watson has proposed merging ~cjwatson/lp-codeimport:merge into lp-codeimport:master.
Commit message:
Merge changes from Launchpad
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/lp-codeimport/+git/lp-codeimport/+merge/394893
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/lp-codeimport:merge into lp-codeimport:master.
diff --git a/lib/contrib/glock.py b/lib/contrib/glock.py
index d1ced09..fb835e2 100644
--- a/lib/contrib/glock.py
+++ b/lib/contrib/glock.py
@@ -101,7 +101,7 @@ class GlobalLock:
std module msvcrt.locking(), because global lock is OK, but
blocks also for 2 calls from the same thread!
'''
- RE_ERROR_MSG = re.compile ("^\[Errno ([0-9]+)\]")
+ RE_ERROR_MSG = re.compile (r"^\[Errno ([0-9]+)\]")
def __init__(self, fpath, lockInitially=False, logger=None):
''' Creates (or opens) a global lock.
diff --git a/lib/lp/services/tests/test_utils.py b/lib/lp/services/tests/test_utils.py
index 3008713..3e29d67 100644
--- a/lib/lp/services/tests/test_utils.py
+++ b/lib/lp/services/tests/test_utils.py
@@ -1,4 +1,4 @@
-# Copyright 2009-2018 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Tests for lp.services.utils."""
diff --git a/lib/lp/services/twistedsupport/processmonitor.py b/lib/lp/services/twistedsupport/processmonitor.py
index 1dbbe98..c4f2b87 100644
--- a/lib/lp/services/twistedsupport/processmonitor.py
+++ b/lib/lp/services/twistedsupport/processmonitor.py
@@ -12,8 +12,8 @@ __all__ = [
]
+import io
import os
-import StringIO
from twisted.internet import (
defer,
@@ -278,8 +278,8 @@ class ProcessWithTimeout(ProcessProtocol, TimeoutMixin):
self._deferred = deferred
self._clock = clock
self._timeout = timeout
- self._out_buf = StringIO.StringIO()
- self._err_buf = StringIO.StringIO()
+ self._out_buf = io.BytesIO()
+ self._err_buf = io.BytesIO()
self._process_transport = None
# outReceived and errReceived are callback methods on
diff --git a/lib/lp/services/utils.py b/lib/lp/services/utils.py
index 88ab318..d42a929 100644
--- a/lib/lp/services/utils.py
+++ b/lib/lp/services/utils.py
@@ -1,4 +1,4 @@
-# Copyright 2009-2018 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Generic Python utilities.
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):