~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/canonical/launchpad/webapp/servers.py

  • Committer: Curtis Hovey
  • Date: 2011-12-24 17:09:12 UTC
  • mfrom: (14600.1.12 apocalypta-1)
  • mto: This revision was merged to the branch mainline in revision 14602.
  • Revision ID: curtis.hovey@canonical.com-20111224170912-e1h1863jnphaqt81
merged apocalypta.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
 
64
64
from canonical.config import config
65
65
from lp.xmlrpc.interfaces import IPrivateApplication
66
 
import canonical.launchpad.layers
 
66
import lp.layers
67
67
from canonical.launchpad.webapp.authentication import (
68
68
    check_oauth_signature,
69
69
    get_oauth_authorization,
615
615
 
616
616
    implements(
617
617
        ILaunchpadBrowserApplicationRequest, ISynchronizer,
618
 
        canonical.launchpad.layers.LaunchpadLayer)
 
618
        lp.layers.LaunchpadLayer)
619
619
 
620
620
    retry_max_count = 5    # How many times we're willing to retry
621
621
 
825
825
    It provides LaunchpadLayer and adds a mock INotificationRequest
826
826
    implementation.
827
827
 
828
 
    >>> canonical.launchpad.layers.LaunchpadLayer.providedBy(request)
 
828
    >>> lp.layers.LaunchpadLayer.providedBy(request)
829
829
    True
830
830
    >>> INotificationRequest.providedBy(request)
831
831
    True
860
860
    """
861
861
    implements(
862
862
        INotificationRequest, IBasicLaunchpadRequest, IParticipation,
863
 
        canonical.launchpad.layers.LaunchpadLayer)
 
863
        lp.layers.LaunchpadLayer)
864
864
 
865
865
    # These two attributes satisfy IParticipation.
866
866
    principal = None
959
959
        """See zope.app.publication.interfaces.IPublicationRequestFactory"""
960
960
        assert output_stream is None, 'output_stream is deprecated in Z3.2'
961
961
 
962
 
        # Mark the request with the 'canonical.launchpad.layers.debug' layer
 
962
        # Mark the request with the 'lp.layers.debug' layer
963
963
        request = HTTPPublicationRequestFactory.__call__(
964
964
            self, input_stream, env)
965
 
        canonical.launchpad.layers.setFirstLayer(
966
 
            request, canonical.launchpad.layers.DebugLayer)
 
965
        lp.layers.setFirstLayer(
 
966
            request, lp.layers.DebugLayer)
967
967
        return request
968
968
 
969
969
 
1122
1122
 
1123
1123
class FeedsBrowserRequest(LaunchpadBrowserRequest):
1124
1124
    """Request type for a launchpad feed."""
1125
 
    implements(canonical.launchpad.layers.FeedsLayer)
 
1125
    implements(lp.layers.FeedsLayer)
1126
1126
 
1127
1127
 
1128
1128
# ---- apidoc
1129
1129
 
1130
1130
class APIDocBrowserRequest(LaunchpadBrowserRequest):
1131
 
    implements(canonical.launchpad.layers.APIDocLayer)
 
1131
    implements(lp.layers.APIDocLayer)
1132
1132
 
1133
1133
 
1134
1134
class APIDocBrowserPublication(LaunchpadBrowserPublication):
1138
1138
# ---- testopenid
1139
1139
 
1140
1140
class TestOpenIDBrowserRequest(LaunchpadBrowserRequest):
1141
 
    implements(canonical.launchpad.layers.TestOpenIDLayer)
 
1141
    implements(lp.layers.TestOpenIDLayer)
1142
1142
 
1143
1143
 
1144
1144
class TestOpenIDBrowserPublication(LaunchpadBrowserPublication):
1307
1307
 
1308
1308
 
1309
1309
class LaunchpadWebServiceRequestTraversal(WebServiceRequestTraversal):
1310
 
    implements(canonical.launchpad.layers.WebServiceLayer)
 
1310
    implements(lp.layers.WebServiceLayer)
1311
1311
 
1312
1312
    def getRootURL(self, rootsite):
1313
1313
        """See IBasicLaunchpadRequest."""