← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~stevenk/launchpad/no-more-lazr-utils into lp:launchpad

 

Steve Kowalik has proposed merging lp:~stevenk/launchpad/no-more-lazr-utils into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~stevenk/launchpad/no-more-lazr-utils/+merge/75117

Drown canonical.lazr.utils. It was just a stub module that imported everything from lazr.restful.utils. Fix remaining imports, reordering them if neccessary.
-- 
https://code.launchpad.net/~stevenk/launchpad/no-more-lazr-utils/+merge/75117
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/no-more-lazr-utils into lp:launchpad.
=== modified file 'lib/canonical/launchpad/browser/librarian.py'
--- lib/canonical/launchpad/browser/librarian.py	2011-06-29 11:21:47 +0000
+++ lib/canonical/launchpad/browser/librarian.py	2011-09-13 05:27:06 +0000
@@ -15,6 +15,7 @@
 
 from lazr.delegates import delegates
 from lazr.restful.interfaces import IWebBrowserOriginatingRequest
+from lazr.restful.utils import get_current_browser_request
 from zope.publisher.interfaces import NotFound
 from zope.security.interfaces import Unauthorized
 
@@ -28,7 +29,6 @@
     stepthrough,
     )
 from canonical.launchpad.webapp.url import urlappend
-from canonical.lazr.utils import get_current_browser_request
 from canonical.librarian.client import url_path_quote
 from lp.app.errors import GoneError
 

=== modified file 'lib/canonical/launchpad/doc/librarian.txt'
--- lib/canonical/launchpad/doc/librarian.txt	2011-03-29 00:11:57 +0000
+++ lib/canonical/launchpad/doc/librarian.txt	2011-09-13 05:27:06 +0000
@@ -226,7 +226,7 @@
 
 Librarian reads are logged in the request timeline.
 
-    >>> from canonical.lazr.utils import get_current_browser_request
+    >>> from lazr.restful.utils import get_current_browser_request
     >>> from lp.services.timeline.requesttimeline import get_request_timeline
     >>> request = get_current_browser_request()
     >>> timeline = get_request_timeline(request)

=== modified file 'lib/canonical/launchpad/pagetitles.py'
--- lib/canonical/launchpad/pagetitles.py	2011-04-21 01:30:30 +0000
+++ lib/canonical/launchpad/pagetitles.py	2011-09-13 05:27:06 +0000
@@ -43,10 +43,10 @@
 """
 __metaclass__ = type
 
+from lazr.restful.utils import smartquote
 from zope.component import getUtility
 
 from canonical.launchpad.webapp.interfaces import ILaunchBag
-from canonical.lazr.utils import smartquote
 from lp.bugs.interfaces.malone import IMaloneApplication
 
 

=== modified file 'lib/canonical/launchpad/utilities/gpghandler.py'
--- lib/canonical/launchpad/utilities/gpghandler.py	2011-08-22 01:10:49 +0000
+++ lib/canonical/launchpad/utilities/gpghandler.py	2011-09-13 05:27:06 +0000
@@ -24,6 +24,7 @@
 import urllib2
 
 import gpgme
+from lazr.restful.utils import get_current_browser_request
 from zope.interface import implements
 
 from canonical.config import config
@@ -47,7 +48,6 @@
     TimeoutError,
     urlfetch,
     )
-from canonical.lazr.utils import get_current_browser_request
 from lp.app.validators.email import valid_email
 from lp.registry.interfaces.gpg import (
     GPGKeyAlgorithm,

=== modified file 'lib/canonical/launchpad/utilities/looptuner.py'
--- lib/canonical/launchpad/utilities/looptuner.py	2011-07-29 13:30:33 +0000
+++ lib/canonical/launchpad/utilities/looptuner.py	2011-09-13 05:27:06 +0000
@@ -13,6 +13,7 @@
 from datetime import timedelta
 import time
 
+from lazr.restful.utils import safe_hasattr
 import transaction
 from zope.component import getUtility
 from zope.interface import implements
@@ -24,7 +25,6 @@
     MAIN_STORE,
     MASTER_FLAVOR,
     )
-from canonical.lazr.utils import safe_hasattr
 
 
 class LoopTuner:

=== modified file 'lib/canonical/launchpad/webapp/adapter.py'
--- lib/canonical/launchpad/webapp/adapter.py	2011-09-02 16:26:59 +0000
+++ lib/canonical/launchpad/webapp/adapter.py	2011-09-13 05:27:06 +0000
@@ -18,6 +18,7 @@
 import traceback
 import warnings
 
+from lazr.restful.utils import get_current_browser_request, safe_hasattr
 import psycopg2
 from psycopg2.extensions import (
     ISOLATION_LEVEL_AUTOCOMMIT,
@@ -72,7 +73,6 @@
     SLAVE_FLAVOR,
     )
 from canonical.launchpad.webapp.opstats import OpStats
-from canonical.lazr.utils import get_current_browser_request, safe_hasattr
 from canonical.lazr.timeout import set_default_timeout_function
 from lp.services import features
 from lp.services.log.loglevels import DEBUG2

=== modified file 'lib/canonical/launchpad/webapp/errorlog.py'
--- lib/canonical/launchpad/webapp/errorlog.py	2011-08-17 01:06:02 +0000
+++ lib/canonical/launchpad/webapp/errorlog.py	2011-09-13 05:27:06 +0000
@@ -19,7 +19,10 @@
 import urllib
 import urlparse
 
-from lazr.restful.utils import get_current_browser_request
+from lazr.restful.utils import (
+    get_current_browser_request,
+    safe_hasattr,
+    )
 import oops.createhooks
 from oops_datedir_repo import DateDirRepo
 import oops_datedir_repo.serializer_rfc822
@@ -47,7 +50,6 @@
 from canonical.launchpad.webapp.opstats import OpStats
 from canonical.launchpad.webapp.pgsession import PGSessionBase
 from canonical.launchpad.webapp.vhosts import allvhosts
-from canonical.lazr.utils import safe_hasattr
 from lp.app import versioninfo
 from lp.services.timeline.requesttimeline import get_request_timeline
 

=== modified file 'lib/canonical/launchpad/webapp/publisher.py'
--- lib/canonical/launchpad/webapp/publisher.py	2011-08-08 22:19:10 +0000
+++ lib/canonical/launchpad/webapp/publisher.py	2011-09-13 05:27:06 +0000
@@ -28,6 +28,14 @@
 import httplib
 import simplejson
 
+from lazr.restful import (
+    EntryResource,
+    ResourceJSONEncoder,
+    )
+from lazr.restful.declarations import error_status
+from lazr.restful.interfaces import IJSONRequestCache
+from lazr.restful.tales import WebLayerAPI
+from lazr.restful.utils import get_current_browser_request
 from zope.app import zapi
 from zope.app.publisher.interfaces.xmlrpc import IXMLRPCView
 from zope.app.publisher.xmlrpc import IMethodPublisher
@@ -52,15 +60,6 @@
     )
 from zope.traversing.browser.interfaces import IAbsoluteURL
 
-from lazr.restful import (
-    EntryResource,
-    ResourceJSONEncoder,
-    )
-from lazr.restful.declarations import error_status
-from lazr.restful.interfaces import IJSONRequestCache
-
-from lazr.restful.tales import WebLayerAPI
-
 from canonical.launchpad.layers import (
     LaunchpadLayer,
     setFirstLayer,
@@ -78,7 +77,6 @@
     )
 from canonical.launchpad.webapp.url import urlappend
 from canonical.launchpad.webapp.vhosts import allvhosts
-from canonical.lazr.utils import get_current_browser_request
 from lp.app.errors import NotFoundError
 from lp.services.encoding import is_ascii_only
 

=== modified file 'lib/canonical/launchpad/webapp/tests/test_statementtracer.py'
--- lib/canonical/launchpad/webapp/tests/test_statementtracer.py	2011-09-01 16:21:12 +0000
+++ lib/canonical/launchpad/webapp/tests/test_statementtracer.py	2011-09-13 05:27:06 +0000
@@ -9,16 +9,17 @@
 import StringIO
 import sys
 
+from lazr.restful.utils import get_current_browser_request
+
+from canonical.launchpad.webapp import adapter as da
+from canonical.testing import DatabaseFunctionalLayer
+from lp.services.osutils import override_environ
+from lp.services.timeline.requesttimeline import get_request_timeline
 from lp.testing import (
     person_logged_in,
     TestCase,
     TestCaseWithFactory,
     )
-from lp.services.osutils import override_environ
-from lp.services.timeline.requesttimeline import get_request_timeline
-from canonical.launchpad.webapp import adapter as da
-from canonical.lazr.utils import get_current_browser_request
-from canonical.testing import DatabaseFunctionalLayer
 
 
 @contextmanager

=== modified file 'lib/canonical/lazr/doc/menus.txt'
--- lib/canonical/lazr/doc/menus.txt	2011-06-23 13:10:40 +0000
+++ lib/canonical/lazr/doc/menus.txt	2011-09-13 05:27:06 +0000
@@ -281,7 +281,7 @@
     >>> defineChecker(MenuLink, InterfaceChecker(ILink))
     >>> defineChecker(URI, NamesChecker(dir(URI)))
 
-    >>> from canonical.lazr.utils import safe_hasattr
+    >>> from lazr.restful.utils import safe_hasattr
     >>> def summarise_links(menu, url=None, facet=None):
     ...     """List the links and their attributes."""
     ...     if url is not None:

=== modified file 'lib/canonical/lazr/doc/utils.txt'
--- lib/canonical/lazr/doc/utils.txt	2008-09-17 01:57:56 +0000
+++ lib/canonical/lazr/doc/utils.txt	2011-09-13 05:27:06 +0000
@@ -6,7 +6,7 @@
 LAZR provides a way of converting TextThatIsWordSeparatedWithInterCaps
 to text_that_is_word_separated_with_underscores.
 
-    >>> from canonical.lazr.utils import camelcase_to_underscore_separated
+    >>> from lazr.restful.utils import camelcase_to_underscore_separated
     >>> camelcase_to_underscore_separated('lowercase')
     'lowercase'
     >>> camelcase_to_underscore_separated('TwoWords')
@@ -27,7 +27,7 @@
 caller. This behaviour of the builtin hasattr() is annoying because it
 makes problems harder to diagnose.
 
-    >>> from canonical.lazr.utils import safe_hasattr
+    >>> from lazr.restful.utils import safe_hasattr
 
     >>> class Oracle(object):
     ...     @property
@@ -58,7 +58,7 @@
 smartquote() converts pairs of inch marks (") in a string to typographical
 quotation marks.
 
-    >>> from canonical.lazr.utils import smartquote
+    >>> from lazr.restful.utils import smartquote
     >>> smartquote('')
     u''
     >>> smartquote('foo "bar" baz')
@@ -82,7 +82,7 @@
 This will escape the given text so that it can be used in Javascript
 code.
 
-    >>> from canonical.lazr.utils import safe_js_escape
+    >>> from lazr.restful.utils import safe_js_escape
     >>> print safe_js_escape('John "nasty" O\'Brien')
     "John "nasty" O'Brien"
     >>> print safe_js_escape("John O\'Brien")

=== modified file 'lib/canonical/lazr/testing/menus.py'
--- lib/canonical/lazr/testing/menus.py	2010-09-27 16:49:22 +0000
+++ lib/canonical/lazr/testing/menus.py	2011-09-13 05:27:06 +0000
@@ -9,12 +9,10 @@
     'make_fake_request',
     ]
 
-
+from lazr.restful.utils import safe_hasattr
 from zope.security.proxy import isinstance as zope_isinstance
 from zope.security.management import endInteraction, newInteraction
 
-from canonical.lazr.utils import safe_hasattr
-
 from canonical.launchpad.webapp import urlsplit
 from canonical.launchpad.webapp.interfaces import ILink
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest

=== removed file 'lib/canonical/lazr/utils.py'
--- lib/canonical/lazr/utils.py	2009-06-25 05:30:52 +0000
+++ lib/canonical/lazr/utils.py	1970-01-01 00:00:00 +0000
@@ -1,9 +0,0 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
-# GNU Affero General Public License version 3 (see the file LICENSE).
-
-# Re-import code from lazr.restful until it can be refactored into a
-# utility module.
-__all__ = []
-import lazr.restful.utils
-__all__.extend(lazr.restful.utils.__all__)
-from lazr.restful.utils import *

=== modified file 'lib/canonical/librarian/client.py'
--- lib/canonical/librarian/client.py	2011-09-03 03:51:05 +0000
+++ lib/canonical/librarian/client.py	2011-09-13 05:27:06 +0000
@@ -29,6 +29,7 @@
     urlunparse,
     )
 
+from lazr.restful.utils import get_current_browser_request
 from storm.store import Store
 from zope.component import getUtility
 from zope.interface import implements
@@ -40,7 +41,6 @@
 from canonical.librarian.interfaces import (
     DownloadFailed, ILibrarianClient, IRestrictedLibrarianClient,
     LIBRARIAN_SERVER_DEFAULT_TIMEOUT, LibrarianServerError, UploadFailed)
-from canonical.lazr.utils import get_current_browser_request
 from lp.services.timeline.requesttimeline import get_request_timeline
 
 

=== modified file 'lib/lp/answers/browser/question.py'
--- lib/lp/answers/browser/question.py	2011-07-29 06:58:45 +0000
+++ lib/lp/answers/browser/question.py	2011-09-13 05:27:06 +0000
@@ -33,6 +33,7 @@
 from lazr.lifecycle.event import ObjectModifiedEvent
 from lazr.lifecycle.snapshot import Snapshot
 from lazr.restful.interface import copy_field
+from lazr.restful.utils import smartquote
 from z3c.ptcompat import ViewPageTemplateFile
 from zope.app.form.browser import (
     TextAreaWidget,
@@ -77,7 +78,6 @@
 from canonical.launchpad.webapp.breadcrumb import Breadcrumb
 from canonical.launchpad.webapp.interfaces import IAlwaysSubmittedWidget
 from canonical.launchpad.webapp.menu import structured
-from canonical.lazr.utils import smartquote
 from lp.answers.browser.questiontarget import SearchQuestionsView
 from lp.answers.enums import (
     QuestionAction,

=== modified file 'lib/lp/app/browser/lazrjs.py'
--- lib/lp/app/browser/lazrjs.py	2011-08-22 12:13:22 +0000
+++ lib/lp/app/browser/lazrjs.py	2011-09-13 05:27:06 +0000
@@ -18,6 +18,12 @@
 
 import simplejson
 
+from lazr.enum import IEnumeratedType
+from lazr.restful.declarations import LAZR_WEBSERVICE_EXPORTED
+from lazr.restful.utils import (
+    get_current_browser_request,
+    safe_hasattr,
+    )
 from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
 from zope.component import getUtility
 from zope.security.checker import canAccess, canWrite
@@ -27,11 +33,6 @@
     )
 from zope.schema.vocabulary import getVocabularyRegistry
 
-from lazr.enum import IEnumeratedType
-from lazr.restful.declarations import LAZR_WEBSERVICE_EXPORTED
-from canonical.lazr.utils import get_current_browser_request
-from canonical.lazr.utils import safe_hasattr
-
 from canonical.launchpad.webapp.interfaces import ILaunchBag
 from canonical.launchpad.webapp.publisher import canonical_url
 from canonical.launchpad.webapp.vocabulary import IHugeVocabulary

=== modified file 'lib/lp/app/widgets/location.py'
--- lib/lp/app/widgets/location.py	2011-02-24 15:30:54 +0000
+++ lib/lp/app/widgets/location.py	2011-09-13 05:27:06 +0000
@@ -9,6 +9,7 @@
     'LocationWidget',
     ]
 
+from lazr.restful.utils import safe_js_escape
 from z3c.ptcompat import ViewPageTemplateFile
 from zope.app.form import InputWidget
 from zope.app.form.browser.interfaces import IBrowserWidget
@@ -31,7 +32,6 @@
     ILaunchBag,
     IMultiLineWidgetLayout,
     )
-from canonical.lazr.utils import safe_js_escape
 from lp.app.browser.tales import ObjectImageDisplayAPI
 from lp.app.validators import LaunchpadValidationError
 from lp.registry.interfaces.location import IObjectWithLocation

=== modified file 'lib/lp/app/widgets/popup.py'
--- lib/lp/app/widgets/popup.py	2011-08-22 12:13:22 +0000
+++ lib/lp/app/widgets/popup.py	2011-09-13 05:27:06 +0000
@@ -9,6 +9,8 @@
 
 import cgi
 import simplejson
+
+from lazr.restful.utils import safe_hasattr
 from z3c.ptcompat import ViewPageTemplateFile
 from zope.app.form.browser.itemswidgets import (
     ItemsWidgetBase,
@@ -18,7 +20,6 @@
 
 from canonical.launchpad.webapp import canonical_url
 from canonical.launchpad.webapp.vocabulary import IHugeVocabulary
-from canonical.lazr.utils import safe_hasattr
 from lp.app.browser.stringformatter import FormattersAPI
 from lp.app.browser.vocabulary import get_person_picker_entry_metadata
 from lp.services.features import getFeatureFlag

=== modified file 'lib/lp/blueprints/browser/specificationbranch.py'
--- lib/lp/blueprints/browser/specificationbranch.py	2010-11-23 23:22:27 +0000
+++ lib/lp/blueprints/browser/specificationbranch.py	2011-09-13 05:27:06 +0000
@@ -12,6 +12,7 @@
     'SpecificationBranchURL',
     ]
 
+from lazr.restful.utils import smartquote
 from zope.interface import implements
 
 from canonical.launchpad import _
@@ -19,7 +20,6 @@
     canonical_url,
     )
 from canonical.launchpad.webapp.interfaces import ICanonicalUrlData
-from canonical.lazr.utils import smartquote
 from lp.app.browser.launchpadform import (
     action,
     LaunchpadEditFormView,

=== modified file 'lib/lp/blueprints/browser/specificationtarget.py'
--- lib/lp/blueprints/browser/specificationtarget.py	2011-05-27 20:03:56 +0000
+++ lib/lp/blueprints/browser/specificationtarget.py	2011-09-13 05:27:06 +0000
@@ -15,6 +15,10 @@
 
 from operator import itemgetter
 
+from lazr.restful.utils import (
+    safe_hasattr,
+    smartquote,
+    )
 from z3c.ptcompat import ViewPageTemplateFile
 from zope.component import (
     getMultiAdapter,
@@ -35,10 +39,6 @@
     enabled_with_permission,
     Link,
     )
-from canonical.lazr.utils import (
-    safe_hasattr,
-    smartquote,
-    )
 from lp.app.enums import service_uses_launchpad
 from lp.app.interfaces.launchpad import IServiceUsage
 from lp.blueprints.enums import (

=== modified file 'lib/lp/blueprints/browser/sprint.py'
--- lib/lp/blueprints/browser/sprint.py	2011-05-22 21:10:25 +0000
+++ lib/lp/blueprints/browser/sprint.py	2011-09-13 05:27:06 +0000
@@ -26,6 +26,7 @@
 import csv
 from StringIO import StringIO
 
+from lazr.restful.utils import smartquote
 import pytz
 from zope.app.form.browser import TextAreaWidget
 from zope.component import getUtility
@@ -45,7 +46,6 @@
     )
 from canonical.launchpad.webapp.batching import BatchNavigator
 from canonical.launchpad.webapp.breadcrumb import Breadcrumb
-from canonical.lazr.utils import smartquote
 from lp.app.browser.launchpadform import (
     action,
     custom_widget,

=== modified file 'lib/lp/blueprints/browser/sprintspecification.py'
--- lib/lp/blueprints/browser/sprintspecification.py	2010-08-20 20:31:18 +0000
+++ lib/lp/blueprints/browser/sprintspecification.py	2011-09-13 05:27:06 +0000
@@ -9,11 +9,12 @@
     'SprintSpecificationDecideView',
     ]
 
+from lazr.restful.utils import smartquote
+
 from canonical.launchpad.webapp import (
     canonical_url,
     LaunchpadView,
     )
-from canonical.lazr.utils import smartquote
 
 
 class SprintSpecificationDecideView(LaunchpadView):

=== modified file 'lib/lp/bugs/browser/bugattachment.py'
--- lib/lp/bugs/browser/bugattachment.py	2011-04-05 06:27:46 +0000
+++ lib/lp/bugs/browser/bugattachment.py	2011-09-13 05:27:06 +0000
@@ -12,6 +12,7 @@
     'BugAttachmentURL',
     ]
 
+from lazr.restful.utils import smartquote
 from zope.component import (
     getMultiAdapter,
     getUtility,
@@ -37,7 +38,6 @@
     ILaunchBag,
     )
 from canonical.launchpad.webapp.menu import structured
-from canonical.lazr.utils import smartquote
 from lp.app.browser.launchpadform import (
     action,
     LaunchpadFormView,

=== modified file 'lib/lp/bugs/browser/bugbranch.py'
--- lib/lp/bugs/browser/bugbranch.py	2010-12-21 19:33:58 +0000
+++ lib/lp/bugs/browser/bugbranch.py	2011-09-13 05:27:06 +0000
@@ -13,6 +13,7 @@
     ]
 
 from lazr.restful.interfaces import IWebServiceClientRequest
+from lazr.restful.utils import smartquote
 from zope.component import (
     adapts,
     getMultiAdapter,
@@ -28,7 +29,6 @@
     LaunchpadView,
     )
 from canonical.launchpad.webapp.interfaces import IPrimaryContext
-from canonical.lazr.utils import smartquote
 from lp.app.browser.launchpadform import (
     action,
     LaunchpadEditFormView,

=== modified file 'lib/lp/bugs/browser/bugtask.py'
--- lib/lp/bugs/browser/bugtask.py	2011-09-10 00:03:46 +0000
+++ lib/lp/bugs/browser/bugtask.py	2011-09-13 05:27:06 +0000
@@ -72,6 +72,7 @@
     IReference,
     IWebServiceClientRequest,
     )
+from lazr.restful.utils import smartquote
 from lazr.uri import URI
 from pytz import utc
 from simplejson import dumps
@@ -154,7 +155,6 @@
 from canonical.launchpad.webapp.interfaces import ILaunchBag
 from canonical.launchpad.webapp.menu import structured
 from canonical.lazr.interfaces import IObjectPrivacy
-from canonical.lazr.utils import smartquote
 from lp.answers.interfaces.questiontarget import IQuestionTarget
 from lp.app.browser.launchpadform import (
     action,

=== modified file 'lib/lp/bugs/browser/bugtracker.py'
--- lib/lp/bugs/browser/bugtracker.py	2011-07-13 02:23:26 +0000
+++ lib/lp/bugs/browser/bugtracker.py	2011-09-13 05:27:06 +0000
@@ -23,6 +23,7 @@
 
 from itertools import chain
 
+from lazr.restful.utils import smartquote
 from zope.app.form.browser import TextAreaWidget
 from zope.component import getUtility
 from zope.formlib import form
@@ -56,7 +57,6 @@
     )
 from canonical.launchpad.webapp.breadcrumb import Breadcrumb
 from canonical.launchpad.webapp.menu import NavigationMenu
-from canonical.lazr.utils import smartquote
 from lp.app.browser.launchpadform import (
     action,
     custom_widget,

=== modified file 'lib/lp/buildmaster/model/builder.py'
--- lib/lp/buildmaster/model/builder.py	2011-07-14 21:49:37 +0000
+++ lib/lp/buildmaster/model/builder.py	2011-09-13 05:27:06 +0000
@@ -21,6 +21,7 @@
 import transaction
 import xmlrpclib
 
+from lazr.restful.utils import safe_hasattr
 from sqlobject import (
     BoolCol,
     ForeignKey,
@@ -33,14 +34,12 @@
     Count,
     Sum,
     )
-
 from twisted.internet import (
     defer,
     reactor as default_reactor,
     )
 from twisted.web import xmlrpc
 from twisted.web.client import downloadPage
-
 from zope.component import getUtility
 from zope.interface import implements
 
@@ -59,7 +58,6 @@
     MAIN_STORE,
     SLAVE_FLAVOR,
     )
-from canonical.lazr.utils import safe_hasattr
 from canonical.librarian.utils import copy_and_close
 from lp.app.errors import NotFoundError
 from lp.buildmaster.interfaces.builder import (

=== modified file 'lib/lp/code/browser/branch.py'
--- lib/lp/code/browser/branch.py	2011-09-02 08:07:39 +0000
+++ lib/lp/code/browser/branch.py	2011-09-13 05:27:06 +0000
@@ -45,6 +45,7 @@
     copy_field,
     use_template,
     )
+from lazr.restful.utils import smartquote
 from lazr.uri import URI
 import pytz
 from zope.app.form import CustomWidgetFactory
@@ -98,7 +99,6 @@
 from canonical.launchpad.webapp.authorization import check_permission
 from canonical.launchpad.webapp.interfaces import ICanonicalUrlData
 from canonical.launchpad.webapp.menu import structured
-from canonical.lazr.utils import smartquote
 from lp.app.browser.launchpad import Hierarchy
 from lp.app.browser.launchpadform import (
     action,

=== modified file 'lib/lp/code/browser/branchsubscription.py'
--- lib/lp/code/browser/branchsubscription.py	2010-11-23 23:22:27 +0000
+++ lib/lp/code/browser/branchsubscription.py	2011-09-13 05:27:06 +0000
@@ -12,7 +12,7 @@
     'BranchSubscriptionPrimaryContext',
     ]
 
-
+from lazr.restful.utils import smartquote
 from zope.interface import implements
 
 from canonical.launchpad.webapp import (
@@ -22,7 +22,6 @@
 from canonical.launchpad.webapp.authorization import check_permission
 from canonical.launchpad.webapp.interfaces import IPrimaryContext
 from canonical.launchpad.webapp.menu import structured
-from canonical.lazr.utils import smartquote
 from lp.app.browser.launchpadform import (
     action,
     LaunchpadEditFormView,

=== modified file 'lib/lp/code/model/branchcollection.py'
--- lib/lp/code/model/branchcollection.py	2011-09-01 21:18:20 +0000
+++ lib/lp/code/model/branchcollection.py	2011-09-13 05:27:06 +0000
@@ -10,6 +10,7 @@
 
 from collections import defaultdict
 
+from lazr.restful.utils import safe_hasattr
 from storm.expr import (
     And,
     Count,
@@ -39,7 +40,6 @@
     )
 from canonical.launchpad.searchbuilder import any
 from canonical.launchpad.webapp.vocabulary import CountableIterator
-from canonical.lazr.utils import safe_hasattr
 from lp.bugs.interfaces.bugtask import (
     IBugTaskSet,
     BugTaskSearchParams,

=== modified file 'lib/lp/registry/browser/distributionsourcepackage.py'
--- lib/lp/registry/browser/distributionsourcepackage.py	2011-08-23 10:45:30 +0000
+++ lib/lp/registry/browser/distributionsourcepackage.py	2011-09-13 05:27:06 +0000
@@ -22,6 +22,7 @@
 
 from lazr.delegates import delegates
 from lazr.restful.interfaces import IJSONRequestCache
+from lazr.restful.utils import smartquote
 import pytz
 from zope.component import (
     adapter,
@@ -51,7 +52,6 @@
     NavigationMenu,
     )
 from canonical.launchpad.webapp.sorting import sorted_dotted_numbers
-from canonical.lazr.utils import smartquote
 from lp.answers.browser.questiontarget import (
     QuestionTargetAnswersMenu,
     QuestionTargetFacetMixin,

=== modified file 'lib/lp/registry/browser/person.py'
--- lib/lp/registry/browser/person.py	2011-09-04 12:46:14 +0000
+++ lib/lp/registry/browser/person.py	2011-09-13 05:27:06 +0000
@@ -99,6 +99,7 @@
 from lazr.delegates import delegates
 from lazr.restful.interface import copy_field
 from lazr.restful.interfaces import IWebServiceClientRequest
+from lazr.restful.utils import smartquote
 from lazr.uri import URI
 import pytz
 from storm.expr import Join
@@ -193,7 +194,6 @@
 from canonical.launchpad.webapp.login import logoutPerson
 from canonical.launchpad.webapp.menu import get_current_view
 from canonical.launchpad.webapp.publisher import LaunchpadView
-from canonical.lazr.utils import smartquote
 from lp.answers.browser.questiontarget import SearchQuestionsView
 from lp.answers.enums import QuestionParticipation
 from lp.answers.interfaces.questioncollection import IQuestionSet

=== modified file 'lib/lp/registry/browser/productrelease.py'
--- lib/lp/registry/browser/productrelease.py	2011-02-02 15:43:31 +0000
+++ lib/lp/registry/browser/productrelease.py	2011-09-13 05:27:06 +0000
@@ -19,6 +19,7 @@
 import mimetypes
 
 from lazr.restful.interface import copy_field
+from lazr.restful.utils import smartquote
 from z3c.ptcompat import ViewPageTemplateFile
 from zope.app.form.browser import (
     TextAreaWidget,
@@ -43,7 +44,6 @@
     Navigation,
     stepthrough,
     )
-from canonical.lazr.utils import smartquote
 from lp.app.browser.launchpadform import (
     action,
     custom_widget,

=== modified file 'lib/lp/registry/browser/sourcepackage.py'
--- lib/lp/registry/browser/sourcepackage.py	2011-07-28 17:34:34 +0000
+++ lib/lp/registry/browser/sourcepackage.py	2011-09-13 05:27:06 +0000
@@ -31,6 +31,7 @@
     Item,
     )
 from lazr.restful.interface import copy_field
+from lazr.restful.utils import smartquote
 from z3c.ptcompat import ViewPageTemplateFile
 from zope.app.form.browser import DropdownWidget
 from zope.app.form.interfaces import IInputWidget
@@ -74,7 +75,6 @@
 from canonical.launchpad.webapp.interfaces import IBreadcrumb
 from canonical.launchpad.webapp.menu import structured
 from canonical.launchpad.webapp.publisher import LaunchpadView
-from canonical.lazr.utils import smartquote
 from lp.app.browser.launchpadform import (
     action,
     custom_widget,

=== modified file 'lib/lp/registry/model/distributionsourcepackage.py'
--- lib/lp/registry/model/distributionsourcepackage.py	2011-08-25 03:31:17 +0000
+++ lib/lp/registry/model/distributionsourcepackage.py	2011-09-13 05:27:06 +0000
@@ -15,6 +15,7 @@
 import itertools
 import operator
 
+from lazr.restful.utils import smartquote
 from sqlobject.sqlbuilder import SQLConstant
 from storm.expr import (
     And,
@@ -35,7 +36,6 @@
 
 from canonical.database.sqlbase import sqlvalues
 from canonical.launchpad.interfaces.lpstorm import IStore
-from canonical.lazr.utils import smartquote
 from lp.bugs.interfaces.bugsummary import IBugSummaryDimension
 from lp.bugs.interfaces.bugtarget import IHasBugHeat
 from lp.bugs.interfaces.bugtask import UNRESOLVED_BUGTASK_STATUSES

=== modified file 'lib/lp/registry/model/person.py'
--- lib/lp/registry/model/person.py	2011-08-26 20:00:37 +0000
+++ lib/lp/registry/model/person.py	2011-09-13 05:27:06 +0000
@@ -40,6 +40,7 @@
 import weakref
 
 from lazr.delegates import delegates
+from lazr.restful.utils import get_current_browser_request
 import pytz
 from sqlobject import (
     BoolCol,
@@ -168,7 +169,6 @@
     )
 from canonical.launchpad.webapp.dbpolicy import MasterDatabasePolicy
 from canonical.launchpad.webapp.interfaces import ILaunchBag
-from canonical.lazr.utils import get_current_browser_request
 from lp.answers.model.questionsperson import QuestionsPersonMixin
 from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.app.validators.email import valid_email

=== modified file 'lib/lp/registry/model/product.py'
--- lib/lp/registry/model/product.py	2011-08-24 04:07:31 +0000
+++ lib/lp/registry/model/product.py	2011-09-13 05:27:06 +0000
@@ -21,6 +21,7 @@
 from lazr.lifecycle.event import ObjectModifiedEvent
 from lazr.lifecycle.snapshot import Snapshot
 from lazr.restful.declarations import error_status
+from lazr.restful.utils import safe_hasattr
 import pytz
 from sqlobject import (
     BoolCol,
@@ -78,7 +79,6 @@
     IStoreSelector,
     MAIN_STORE,
     )
-from canonical.lazr.utils import safe_hasattr
 from lp.answers.enums import QUESTION_STATUS_DEFAULT_SEARCH
 from lp.answers.interfaces.faqtarget import IFAQTarget
 from lp.answers.model.faq import (

=== modified file 'lib/lp/registry/model/sourcepackage.py'
--- lib/lp/registry/model/sourcepackage.py	2011-08-16 01:55:27 +0000
+++ lib/lp/registry/model/sourcepackage.py	2011-09-13 05:27:06 +0000
@@ -13,6 +13,7 @@
 
 from operator import attrgetter
 
+from lazr.restful.utils import smartquote
 from storm.locals import (
     And,
     Desc,
@@ -30,7 +31,6 @@
     sqlvalues,
     )
 from canonical.launchpad.interfaces.lpstorm import IStore
-from canonical.lazr.utils import smartquote
 from canonical.launchpad.webapp.interfaces import ILaunchBag
 from lp.answers.enums import QUESTION_STATUS_DEFAULT_SEARCH
 from lp.answers.model.question import (

=== modified file 'lib/lp/registry/tests/test_prf_walker.py'
--- lib/lp/registry/tests/test_prf_walker.py	2011-08-12 11:37:08 +0000
+++ lib/lp/registry/tests/test_prf_walker.py	2011-09-13 05:27:06 +0000
@@ -7,8 +7,8 @@
 import StringIO
 import urlparse
 
+from lazr.restful.utils import safe_hasattr
 
-from canonical.lazr.utils import safe_hasattr
 from canonical.testing import reset_logging
 from lp.registry.scripts.productreleasefinder.walker import WalkerBase
 from lp.testing import TestCase

=== modified file 'lib/lp/registry/vocabularies.py'
--- lib/lp/registry/vocabularies.py	2011-08-25 04:27:35 +0000
+++ lib/lp/registry/vocabularies.py	2011-09-13 05:27:06 +0000
@@ -62,6 +62,8 @@
 
 from operator import attrgetter
 
+from lazr.restful.interfaces import IReference
+from lazr.restful.utils import safe_hasattr
 from sqlobject import (
     AND,
     CONTAINSSTRING,
@@ -95,8 +97,6 @@
     removeSecurityProxy,
     )
 
-from lazr.restful.interfaces import IReference
-
 from canonical.database.sqlbase import (
     quote,
     quote_like,
@@ -131,7 +131,6 @@
     SQLObjectVocabularyBase,
     VocabularyFilter,
     )
-from canonical.lazr.utils import safe_hasattr
 from lp.app.browser.tales import DateTimeFormatterAPI
 from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.blueprints.interfaces.specification import ISpecification

=== modified file 'lib/lp/services/apachelogparser/script.py'
--- lib/lp/services/apachelogparser/script.py	2011-01-05 04:56:11 +0000
+++ lib/lp/services/apachelogparser/script.py	2011-09-13 05:27:06 +0000
@@ -7,10 +7,10 @@
 import glob
 import os
 
+from lazr.restful.utils import safe_hasattr
 from zope.component import getUtility
 
 from canonical.config import config
-from canonical.lazr.utils import safe_hasattr
 from lp.app.errors import NotFoundError
 from lp.services.apachelogparser.base import (
     create_or_update_parsedlog_entry,

=== modified file 'lib/lp/soyuz/browser/archive.py'
--- lib/lp/soyuz/browser/archive.py	2011-09-09 18:30:12 +0000
+++ lib/lp/soyuz/browser/archive.py	2011-09-13 05:27:06 +0000
@@ -35,6 +35,7 @@
     timedelta,
     )
 
+from lazr.restful.utils import smartquote
 import pytz
 from sqlobject import SQLObjectNotFound
 from storm.expr import Desc
@@ -80,7 +81,6 @@
     NavigationMenu,
     structured,
     )
-from canonical.lazr.utils import smartquote
 from lp.app.browser.launchpadform import (
     action,
     custom_widget,

=== modified file 'lib/lp/soyuz/browser/build.py'
--- lib/lp/soyuz/browser/build.py	2011-05-04 02:45:25 +0000
+++ lib/lp/soyuz/browser/build.py	2011-09-13 05:27:06 +0000
@@ -17,6 +17,7 @@
     ]
 
 from lazr.delegates import delegates
+from lazr.restful.utils import safe_hasattr
 from zope.component import getUtility
 from zope.interface import implements
 
@@ -39,7 +40,6 @@
 from canonical.launchpad.webapp.batching import BatchNavigator
 from canonical.launchpad.webapp.breadcrumb import Breadcrumb
 from canonical.launchpad.webapp.interfaces import ICanonicalUrlData
-from canonical.lazr.utils import safe_hasattr
 from lp.app.browser.launchpadform import (
     action,
     LaunchpadFormView,

=== modified file 'lib/lp/soyuz/browser/builder.py'
--- lib/lp/soyuz/browser/builder.py	2011-05-03 03:08:21 +0000
+++ lib/lp/soyuz/browser/builder.py	2011-09-13 05:27:06 +0000
@@ -20,6 +20,7 @@
 
 import operator
 
+from lazr.restful.utils import smartquote
 from zope.app.form.browser import (
     TextAreaWidget,
     TextWidget,
@@ -41,7 +42,6 @@
     stepthrough,
     )
 from canonical.launchpad.webapp.breadcrumb import Breadcrumb
-from canonical.lazr.utils import smartquote
 from lp.app.browser.launchpadform import (
     action,
     custom_widget,

=== modified file 'lib/lp/soyuz/browser/distributionsourcepackagerelease.py'
--- lib/lp/soyuz/browser/distributionsourcepackagerelease.py	2011-01-12 21:29:19 +0000
+++ lib/lp/soyuz/browser/distributionsourcepackagerelease.py	2011-09-13 05:27:06 +0000
@@ -12,13 +12,14 @@
 
 import operator
 
+from lazr.restful.utils import smartquote
+
 from canonical.launchpad.browser.librarian import ProxiedLibraryFileAlias
 from canonical.launchpad.webapp import (
     LaunchpadView,
     Navigation,
     )
 from canonical.launchpad.webapp.breadcrumb import Breadcrumb
-from canonical.lazr.utils import smartquote
 from lp.archivepublisher.debversion import Version
 from lp.services.propertycache import cachedproperty
 from lp.soyuz.browser.build import BuildNavigationMixin

=== modified file 'lib/lp/soyuz/browser/distroarchseries.py'
--- lib/lp/soyuz/browser/distroarchseries.py	2010-11-23 23:22:27 +0000
+++ lib/lp/soyuz/browser/distroarchseries.py	2011-09-13 05:27:06 +0000
@@ -13,6 +13,7 @@
     'DistroArchSeriesView',
     ]
 
+from lazr.restful.utils import smartquote
 from zope.interface import (
     implements,
     Interface,
@@ -30,7 +31,6 @@
     NavigationMenu,
     )
 from canonical.launchpad.webapp.publisher import canonical_url
-from canonical.lazr.utils import smartquote
 from lp.app.browser.launchpadform import (
     action,
     LaunchpadFormView,

=== modified file 'lib/lp/soyuz/browser/distroarchseriesbinarypackage.py'
--- lib/lp/soyuz/browser/distroarchseriesbinarypackage.py	2011-07-27 17:34:09 +0000
+++ lib/lp/soyuz/browser/distroarchseriesbinarypackage.py	2011-09-13 05:27:06 +0000
@@ -8,12 +8,13 @@
     'DistroArchSeriesBinaryPackageView',
     ]
 
+from lazr.restful.utils import smartquote
+
 from canonical.launchpad.webapp import (
     ApplicationMenu,
     GetitemNavigation,
     LaunchpadView,
     )
-from canonical.lazr.utils import smartquote
 from lp.soyuz.interfaces.distroarchseriesbinarypackage import (
     IDistroArchSeriesBinaryPackage,
     )

=== modified file 'lib/lp/soyuz/browser/distroseriesbinarypackage.py'
--- lib/lp/soyuz/browser/distroseriesbinarypackage.py	2011-07-01 11:27:27 +0000
+++ lib/lp/soyuz/browser/distroseriesbinarypackage.py	2011-09-13 05:27:06 +0000
@@ -10,6 +10,8 @@
     'DistroSeriesBinaryPackageView',
     ]
 
+from lazr.restful.utils import smartquote
+
 from canonical.launchpad.webapp import (
     ApplicationMenu,
     LaunchpadView,
@@ -17,7 +19,6 @@
     StandardLaunchpadFacets,
     )
 from canonical.launchpad.webapp.breadcrumb import Breadcrumb
-from canonical.lazr.utils import smartquote
 from lp.soyuz.interfaces.distroseriesbinarypackage import (
     IDistroSeriesBinaryPackage,
     )

=== modified file 'lib/lp/soyuz/browser/distroseriessourcepackagerelease.py'
--- lib/lp/soyuz/browser/distroseriessourcepackagerelease.py	2011-07-01 11:27:27 +0000
+++ lib/lp/soyuz/browser/distroseriessourcepackagerelease.py	2011-09-13 05:27:06 +0000
@@ -8,13 +8,14 @@
     'DistroSeriesSourcePackageReleaseView',
     ]
 
+from lazr.restful.utils import smartquote
+
 from canonical.launchpad.webapp import (
     ApplicationMenu,
     LaunchpadView,
     Navigation,
     stepthrough,
     )
-from canonical.lazr.utils import smartquote
 from lp.soyuz.interfaces.distroseriessourcepackagerelease import (
     IDistroSeriesSourcePackageRelease,
     )

=== modified file 'lib/lp/soyuz/browser/sourcepackage.py'
--- lib/lp/soyuz/browser/sourcepackage.py	2011-07-01 11:27:27 +0000
+++ lib/lp/soyuz/browser/sourcepackage.py	2011-09-13 05:27:06 +0000
@@ -10,13 +10,13 @@
     'SourcePackageCopyrightView',
     ]
 
+from lazr.restful.utils import smartquote
 from zope.component import getUtility
 
 from canonical.launchpad.webapp import (
     LaunchpadView,
     Navigation,
     )
-from canonical.lazr.utils import smartquote
 from lp.registry.interfaces.distribution import IDistributionSet
 from lp.registry.interfaces.distroseries import IDistroSeriesSet
 from lp.registry.interfaces.distroseriesdifference import (

=== modified file 'lib/lp/soyuz/browser/sourcepackagebuilds.py'
--- lib/lp/soyuz/browser/sourcepackagebuilds.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/browser/sourcepackagebuilds.py	2011-09-13 05:27:06 +0000
@@ -9,7 +9,8 @@
     'SourcePackageBuildsView',
     ]
 
-from canonical.lazr.utils import smartquote
+from lazr.restful.utils import smartquote
+
 from lp.soyuz.browser.build import BuildRecordsView
 
 

=== modified file 'lib/lp/translations/browser/customlanguagecode.py'
--- lib/lp/translations/browser/customlanguagecode.py	2011-03-30 11:17:35 +0000
+++ lib/lp/translations/browser/customlanguagecode.py	2011-09-13 05:27:06 +0000
@@ -16,6 +16,8 @@
 
 import re
 
+from lazr.restful.utils import smartquote
+
 from canonical.launchpad.webapp import (
     canonical_url,
     LaunchpadView,
@@ -24,7 +26,6 @@
     )
 from canonical.launchpad.webapp.breadcrumb import Breadcrumb
 from canonical.launchpad.webapp.menu import structured
-from canonical.lazr.utils import smartquote
 from lp.app.browser.launchpadform import (
     action,
     LaunchpadFormView,

=== modified file 'lib/lp/translations/browser/pofile.py'
--- lib/lp/translations/browser/pofile.py	2011-04-06 15:54:12 +0000
+++ lib/lp/translations/browser/pofile.py	2011-09-13 05:27:06 +0000
@@ -21,6 +21,7 @@
 import re
 import urllib
 
+from lazr.restful.utils import smartquote
 from zope.component import getUtility
 from zope.publisher.browser import FileUpload
 
@@ -37,7 +38,6 @@
 from canonical.launchpad.webapp.batching import BatchNavigator
 from canonical.launchpad.webapp.interfaces import ILaunchBag
 from canonical.launchpad.webapp.menu import structured
-from canonical.lazr.utils import smartquote
 from lp.app.errors import (
     NotFoundError,
     UnexpectedFormData,

=== modified file 'lib/lp/translations/browser/potemplate.py'
--- lib/lp/translations/browser/potemplate.py	2011-08-30 11:07:52 +0000
+++ lib/lp/translations/browser/potemplate.py	2011-09-13 05:27:06 +0000
@@ -30,6 +30,7 @@
 import operator
 import os.path
 
+from lazr.restful.utils import smartquote
 from storm.info import ClassAlias
 from storm.expr import (
     And,
@@ -64,7 +65,6 @@
     ILaunchBag,
     )
 from canonical.launchpad.webapp.menu import structured
-from canonical.lazr.utils import smartquote
 from lp.app.browser.launchpadform import ReturnToReferrerMixin
 from lp.app.browser.tales import DateTimeFormatterAPI
 from lp.app.enums import (

=== modified file 'lib/lp/translations/browser/tests/test_breadcrumbs.py'
--- lib/lp/translations/browser/tests/test_breadcrumbs.py	2011-08-03 11:00:11 +0000
+++ lib/lp/translations/browser/tests/test_breadcrumbs.py	2011-09-13 05:27:06 +0000
@@ -4,8 +4,8 @@
 __metaclass__ = type
 
 from zope.component import getUtility
+from lazr.restful.utils import smartquote
 
-from canonical.lazr.utils import smartquote
 from lp.app.enums import ServiceUsage
 from lp.services.worlddata.interfaces.language import ILanguageSet
 from lp.testing.breadcrumbs import BaseBreadcrumbTestCase