← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/upgrade-zope-interface into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/upgrade-zope-interface into lp:launchpad.

Commit message:
Upgrade to zope.component 3.11.0 and zope.interface 4.4.3, saving a couple of seconds from ZCML registration.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/upgrade-zope-interface/+merge/334110

I had to fix a couple of things that caused test failures due to the newer registry code being a bit pickier, but otherwise this was remarkably painless.  This saves about 2.4 seconds from e.g. FunctionalLayer setup on my laptop.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/upgrade-zope-interface into lp:launchpad.
=== modified file 'lib/lp/blueprints/tests/test_specification.py'
--- lib/lp/blueprints/tests/test_specification.py	2017-10-25 13:10:41 +0000
+++ lib/lp/blueprints/tests/test_specification.py	2017-11-22 13:41:24 +0000
@@ -217,7 +217,7 @@
 
     def test_security_adapters(self):
         expected_adapters = {
-            CheckerPublic: None,
+            'zope.Public': None,
             'launchpad.Admin': AdminSpecification,
             'launchpad.Edit': EditSpecificationByRelatedPeople,
             'launchpad.LimitedView': ViewSpecification,

=== modified file 'lib/lp/services/webapp/menu.py'
--- lib/lp/services/webapp/menu.py	2015-07-09 20:06:17 +0000
+++ lib/lp/services/webapp/menu.py	2017-11-22 13:41:24 +0000
@@ -75,7 +75,7 @@
 
 def get_facet(view):
     """Return the view's facet name."""
-    return getattr(removeSecurityProxy(view), '__launchpad_facetname__', None)
+    return getattr(removeSecurityProxy(view), '__launchpad_facetname__', u'')
 
 
 @implementer(ILinkData)

=== modified file 'lib/lp/services/webapp/publisher.py'
--- lib/lp/services/webapp/publisher.py	2016-09-14 11:13:06 +0000
+++ lib/lp/services/webapp/publisher.py	2017-11-22 13:41:24 +0000
@@ -658,9 +658,11 @@
     defined with the specified name, then LaunchpadLayer is returned.
     """
     try:
-        return getUtility(IDefaultBrowserLayer, rootsite)
+        if rootsite is not None:
+            return getUtility(IDefaultBrowserLayer, rootsite)
     except ComponentLookupError:
-        return LaunchpadLayer
+        pass
+    return LaunchpadLayer
 
 
 class FakeRequest:

=== modified file 'versions.cfg'
--- versions.cfg	2017-10-24 09:42:12 +0000
+++ versions.cfg	2017-11-22 13:41:24 +0000
@@ -151,6 +151,10 @@
 ZConfig = 2.9.1dev-20110728
 # Not in ZTK 1.1.5
 zope.app.server = 3.6.0
+# Upgrade from ZTK 1.1.6 for ZCML registration performance.
+zope.component = 3.11.0
+# Upgrade from ZTK 1.1.6 for ZCML registration performance.
+zope.interface = 4.4.3
 # Build of lp:~wallyworld/zope.pagetemplate/fix-isinstance
 # This version adds a small change to the traversal logic so that the
 # optimisation which applies if the object is a dict also works for subclasses


Follow ups