← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:misc-breezy into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:misc-breezy into launchpad:master.

Commit message:
Port some miscellaneous code to Breezy

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/377946
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:misc-breezy into launchpad:master.
diff --git a/lib/lp/registry/browser/product.py b/lib/lp/registry/browser/product.py
index ad188ec..a424367 100644
--- a/lib/lp/registry/browser/product.py
+++ b/lib/lp/registry/browser/product.py
@@ -44,8 +44,8 @@ __all__ = [
 from operator import attrgetter
 from urlparse import urlunsplit
 
-from bzrlib import urlutils
-from bzrlib.revision import NULL_REVISION
+from breezy import urlutils
+from breezy.revision import NULL_REVISION
 from lazr.delegates import delegate_to
 from lazr.restful.interface import (
     copy_field,
diff --git a/lib/lp/registry/model/distributionsourcepackage.py b/lib/lp/registry/model/distributionsourcepackage.py
index d41d621..2dd3121 100644
--- a/lib/lp/registry/model/distributionsourcepackage.py
+++ b/lib/lp/registry/model/distributionsourcepackage.py
@@ -17,7 +17,7 @@ from operator import (
     )
 from threading import local
 
-from bzrlib.lru_cache import LRUCache
+from breezy.lru_cache import LRUCache
 from sqlobject.sqlbuilder import SQLConstant
 from storm.expr import (
     And,
diff --git a/lib/lp/scripts/utilities/importpedant.py b/lib/lp/scripts/utilities/importpedant.py
index 7a56898..7d7b268 100644
--- a/lib/lp/scripts/utilities/importpedant.py
+++ b/lib/lp/scripts/utilities/importpedant.py
@@ -27,7 +27,6 @@ def text_lines_to_set(text):
 # __all__. The following dict maps from such modules to a list of attributes
 # that are allowed to be imported, whether or not they are in __all__.
 valid_imports_not_in_all = {
-    'bzrlib.lsprof': set(['BzrProfiler']),
     'cookielib': set(['domain_match']),
     # Exported in Python 3, but missing and so not exported in Python 2.
     'json.decoder': set(['JSONDecodeError']),
diff --git a/lib/lp/services/profile/profile.py b/lib/lp/services/profile/profile.py
index 0c7a077..c44778a 100644
--- a/lib/lp/services/profile/profile.py
+++ b/lib/lp/services/profile/profile.py
@@ -22,7 +22,7 @@ import StringIO
 import sys
 import threading
 
-from bzrlib import lsprof
+from breezy import lsprof
 import oops_datedir_repo.serializer_rfc822
 from zope.component import (
     adapter,
@@ -100,7 +100,7 @@ class Profiler:
         This unhooks from threading and cleans up the profiler, returning
         the gathered Stats object.
 
-        :return: A bzrlib.lsprof.Stats object.
+        :return: A breezy.lsprof.Stats object.
         """
         try:
             self.disable()
diff --git a/lib/lp/services/testing/parallel.py b/lib/lp/services/testing/parallel.py
index 23436de..26d9e09 100644
--- a/lib/lp/services/testing/parallel.py
+++ b/lib/lp/services/testing/parallel.py
@@ -11,7 +11,7 @@ import subprocess
 import sys
 import tempfile
 
-from bzrlib.osutils import local_concurrency
+from breezy.osutils import local_concurrency
 from subunit import ProtocolTestCase
 from subunit.run import SubunitTestRunner
 from testtools import (
diff --git a/lib/lp/snappy/model/snap.py b/lib/lp/snappy/model/snap.py
index 18eee6e..96aecd2 100644
--- a/lib/lp/snappy/model/snap.py
+++ b/lib/lp/snappy/model/snap.py
@@ -17,8 +17,7 @@ from datetime import (
 from operator import attrgetter
 from urlparse import urlsplit
 
-from bzrlib import urlutils
-from bzrlib.errors import InvalidURLJoin
+from breezy import urlutils
 from lazr.lifecycle.event import ObjectCreatedEvent
 from pymacaroons import Macaroon
 import pytz
@@ -1365,7 +1364,7 @@ class SnapSet:
                 raise MissingSnapcraftYaml(context.unique_name)
         except GitRepositoryBlobUnsupportedRemote as e:
             raise CannotFetchSnapcraftYaml(str(e), unsupported_remote=True)
-        except InvalidURLJoin as e:
+        except urlutils.InvalidURLJoin as e:
             raise CannotFetchSnapcraftYaml(str(e))
         except (BranchHostingFault, GitRepositoryScanFault) as e:
             msg = "Failed to get snap manifest from %s"
diff --git a/lib/lp/testing/pgsql.py b/lib/lp/testing/pgsql.py
index 70b4965..5ef18ba 100644
--- a/lib/lp/testing/pgsql.py
+++ b/lib/lp/testing/pgsql.py
@@ -13,8 +13,8 @@ import random
 import sys
 import time
 
-from bzrlib.errors import LockContention
-from bzrlib.lock import WriteLock
+from breezy.errors import LockContention
+from breezy.lock import WriteLock
 import psycopg2
 
 from lp.services.config import config
diff --git a/lib/lp/testing/tests/test_pages.py b/lib/lp/testing/tests/test_pages.py
index 68d8259..738ee6d 100644
--- a/lib/lp/testing/tests/test_pages.py
+++ b/lib/lp/testing/tests/test_pages.py
@@ -10,7 +10,7 @@ import shutil
 import tempfile
 import unittest
 
-from bzrlib.tests import iter_suite_tests
+from breezy.tests import iter_suite_tests
 
 from lp.testing.layers import PageTestLayer
 from lp.testing.pages import PageTestSuite
diff --git a/utilities/get-branch-info b/utilities/get-branch-info
index 128ca9a..5143087 100755
--- a/utilities/get-branch-info
+++ b/utilities/get-branch-info
@@ -12,7 +12,7 @@ import _pythonpath
 
 import sys
 
-from bzrlib.urlutils import join
+from breezy.urlutils import join
 from zope.component import getUtility
 
 from lp.code.enums import BranchType