← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/zope.pagetemplate-4.3.0 into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/zope.pagetemplate-4.3.0 into lp:launchpad with lp:~cjwatson/launchpad/twisted-16.5.0 as a prerequisite.

Commit message:
Upgrade to zope.pagetemplate 4.3.0, dropping the untrustedpython extra in the process.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/zope.pagetemplate-4.3.0/+merge/335582

This squashes a local fork.  The results of tal:attributes are now emitted in sorted order, which required some minor doctest adjustments.

The untrustedpython extra would have been handled slightly differently with the upgrade, but after some consideration I decided to simply drop it, since all our page template files are in trusted code anyway so there's no point going to particular lengths to sandbox their "python:" expressions any more than we would if they were just in normal Python code.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/zope.pagetemplate-4.3.0 into lp:launchpad.
=== modified file 'constraints.txt'
--- constraints.txt	2017-12-24 17:12:45 +0000
+++ constraints.txt	2017-12-24 17:12:45 +0000
@@ -35,7 +35,8 @@
 zope.filerepresentation==3.6.1
 zope.formlib==4.0.6
 zope.hookable==3.4.1
-zope.i18n==3.7.4
+#zope.i18n==3.7.4
+zope.i18n==4.3.1
 zope.i18nmessageid==3.5.3
 zope.index==3.6.4
 #zope.interface==3.7.0
@@ -49,14 +50,7 @@
 zope.mimetype==1.3.1
 zope.minmax==1.1.2
 #zope.pagetemplate==3.5.2
-# Build of lp:~wallyworld/zope.pagetemplate/fix-isinstance
-# p1    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 of dict. This patch has been merged in 4.2.0, so we can
-#       drop it when we upgrade.
-# post2 Cherry-pick zope.security [untrustedpython] dependency from 3.5.1.
-#       Use PEP 440-compliant version.
-zope.pagetemplate==3.5.0.post2
+zope.pagetemplate==4.3.0
 zope.password==3.6.1
 zope.pluggableauth==1.2
 zope.principalannotation==3.6.1
@@ -67,11 +61,7 @@
 zope.publisher==3.12.6
 zope.ramcache==1.0
 zope.schema==3.7.1
-#zope.security==3.8.3
-# Tell pip about extras to work around https://github.com/pypa/pip/issues/3046
-# XXX cjwatson 2017-09-03: This should be fixed in pip 9.0.0, but apparently
-# isn't.
-zope.security[untrustedpython]==3.8.3
+zope.security==3.8.3
 zope.securitypolicy==3.7.0
 zope.sendmail==3.7.5
 zope.sequencesort==3.4.0
@@ -82,7 +72,8 @@
 zope.site==3.9.2
 zope.size==3.4.1
 zope.structuredtext==3.5.1
-zope.tal==3.5.2
+#zope.tal==3.5.2
+zope.tal==4.3.0
 zope.tales==3.5.3
 #zope.testing==3.10.3
 # p1 Build of lp:~mars/zope.testing/3.9.4-p1.  Fixes bugs 570380 and 587886.
@@ -130,7 +121,8 @@
 py==1.4.8
 #Pygments==1.4
 Pygments==1.6
-python-gettext==1.0
+#python-gettext==1.0
+python-gettext==3.0
 #python-subunit==0.0.7
 python-subunit==0.0.8beta
 #pytz==2014.10

=== modified file 'lib/lp/answers/browser/tests/faq-views.txt'
--- lib/lp/answers/browser/tests/faq-views.txt	2012-07-09 03:31:31 +0000
+++ lib/lp/answers/browser/tests/faq-views.txt	2017-12-24 17:12:45 +0000
@@ -54,7 +54,7 @@
 permission, such as the project owner.
 
     >>> print content.find('a', {'class': 'menu-link-create_faq sprite add'})
-    <a href=".../firefox/+createfaq" class="...">Create a new FAQ</a>
+    <a class="..." href=".../firefox/+createfaq">Create a new FAQ</a>
 
 Other users do not see the link.
 

=== modified file 'lib/lp/app/browser/tests/menu.txt'
--- lib/lp/app/browser/tests/menu.txt	2015-07-08 16:05:11 +0000
+++ lib/lp/app/browser/tests/menu.txt	2017-12-24 17:12:45 +0000
@@ -80,15 +80,15 @@
       <ul>
     <BLANKLINE>
         <li>
-          <a href="http://launchpad.dev/~beaker/+edit";
-             class="menu-link-edit_thing
-                    sprite modify edit">Edit thing</a>
+          <a class="menu-link-edit_thing sprite modify edit"
+             href="http://launchpad.dev/~beaker/+edit";>Edit thing</a>
         </li>
     <BLANKLINE>
     <BLANKLINE>
         <li>
-            <a href="http://launchpad.dev/~beaker/+edit-people";
-               class="menu-link-edit_people">Edit people related to thing</a>
+            <a class="menu-link-edit_people"
+               href="http://launchpad.dev/~beaker/+edit-people";>Edit
+                 people related to thing</a>
         </li>
         ...
     </div>
@@ -147,8 +147,9 @@
               sprite modify edit">Edit thing</span>
         </li>
         <li>
-          <a href="http://launchpad.dev/~beaker/+edit-people";
-             class="menu-link-edit_people">Edit people related to thing</a>
+          <a class="menu-link-edit_people"
+             href="http://launchpad.dev/~beaker/+edit-people";>Edit
+               people related to thing</a>
         </li>
       </ul>
     </div>

=== modified file 'lib/lp/app/doc/lazr-js-widgets.txt'
--- lib/lp/app/doc/lazr-js-widgets.txt	2015-10-01 17:32:41 +0000
+++ lib/lp/app/doc/lazr-js-widgets.txt	2017-12-24 17:12:45 +0000
@@ -37,8 +37,8 @@
 
     >>> print widget()
     <h1 id="edit-display_name">
-    <span style="max-width: 90%;"
-          class="yui3-editable_text-text ellipsis">
+    <span class="yui3-editable_text-text ellipsis"
+          style="max-width: 90%;">
         Widgets &gt; important
     </span>
     </h1>
@@ -50,8 +50,8 @@
     >>> ignored = login_person(product.owner)
     >>> print widget()
     <h1 id="edit-display_name">
-    <span style="max-width: 90%;"
-          class="yui3-editable_text-text ellipsis">
+    <span class="yui3-editable_text-text ellipsis"
+          style="max-width: 90%;">
         Widgets &gt; important
     </span>
         <a class="yui3-editable_text-trigger sprite edit action-icon"
@@ -151,7 +151,7 @@
     >>> login(ANONYMOUS)
     >>> print widget()
     <div>
-      <div id="edit-description" class="lazr-multiline-edit">
+      <div class="lazr-multiline-edit" id="edit-description">
         <div class="clearfix">
           <h3>A title</h3>
         </div>
@@ -170,7 +170,7 @@
     >>> ignored = login_person(eric)
     >>> print widget()
     <div>
-      <div id="edit-description" class="lazr-multiline-edit">
+      <div class="lazr-multiline-edit" id="edit-description">
         <div class="clearfix">
           <div class="edit-controls">
             <a class="yui3-editable_text-trigger sprite edit action-icon"
@@ -209,7 +209,7 @@
     >>> clear_property_cache(widget)
     >>> print widget()
     <div>
-    <div id="edit-description" class="lazr-multiline-edit hidden">
+    <div class="lazr-multiline-edit hidden" id="edit-description">
     ...
 
 This behaviour can be overridden by setting the "hide_empty" parameter to
@@ -219,7 +219,7 @@
     ...     archive, description, 'A title', hide_empty=False)
     >>> print widget()
     <div>
-    <div id="edit-description" class="lazr-multiline-edit">
+    <div class="lazr-multiline-edit" id="edit-description">
     ...
 
 

=== modified file 'lib/lp/app/doc/menus.txt'
--- lib/lp/app/doc/menus.txt	2016-01-26 15:47:37 +0000
+++ lib/lp/app/doc/menus.txt	2017-12-24 17:12:45 +0000
@@ -1152,16 +1152,16 @@
     <div>
       <ul>
         <li>
-          <a href=".../joy-of-cooking/fried-spam"
-             class="selected-True">Summary</a>
-        </li>
-        <li>
-          <a href=".../joy-of-cooking/fried-spam/+questions"
-             class="selected-False">Questions</a>
-        </li>
-        <li>
-          <a href=".../joy-of-cooking/fried-spam/+variations"
-             class="selected-False">Variations</a>
+          <a class="selected-True"
+             href=".../joy-of-cooking/fried-spam">Summary</a>
+        </li>
+        <li>
+          <a class="selected-False"
+             href=".../joy-of-cooking/fried-spam/+questions">Questions</a>
+        </li>
+        <li>
+          <a class="selected-False"
+             href=".../joy-of-cooking/fried-spam/+variations">Variations</a>
         </li>
       </ul>
     </div>
@@ -1175,8 +1175,8 @@
     <div>
       <ul>
         <li>
-          <a href=".../joy-of-cooking/fried-spam"
-             class="selected-None">Summary</a>
+          <a class="selected-None"
+             href=".../joy-of-cooking/fried-spam">Summary</a>
         </li>
         <li>
           <strong>Journal</strong>
@@ -1201,8 +1201,8 @@
           <strong>Read Journal entries</strong>
         </li>
         <li>
-          <a href=".../joy-of-cooking/fried-spam/+write-entry"
-             class="selected-None">Write
+          <a class="selected-None"
+             href=".../joy-of-cooking/fried-spam/+write-entry">Write
             a journal entry</a>
         </li>
       </ul>

=== modified file 'lib/lp/app/doc/tales.txt'
--- lib/lp/app/doc/tales.txt	2017-10-21 18:14:14 +0000
+++ lib/lp/app/doc/tales.txt	2017-12-24 17:12:45 +0000
@@ -1501,36 +1501,38 @@
 The link can be rendered as an anchored icon.
 
     >>> print test_tales('menu_link/fmt:icon', menu_link=menu_link)
-    <a href="http://launchpad.dev/+place";
-       class="menu-link-test_link sprite icon action-icon"
+    <a class="menu-link-test_link sprite icon action-icon"
+       href="http://launchpad.dev/+place";
        title="summary">text</a>
 
 The default rendering can be explicitly called too, text with an icon to
 the left.
 
     >>> print test_tales('menu_link/fmt:link', menu_link=menu_link)
-    <a href="http://launchpad.dev/+place";
-       class="menu-link-test_link sprite icon" title="summary">text</a>
+    <a class="menu-link-test_link sprite icon"
+       href="http://launchpad.dev/+place";
+       title="summary">text</a>
 
 The 'edit', 'remove' and 'trash-icon' links are rendered icons followed
 by text. They have both the sprite and modify CSS classes.
 
     >>> menu_link.icon = 'edit'
     >>> print test_tales('menu_link/fmt:link', menu_link=menu_link)
-    <a href="http://launchpad.dev/+place";
-       class="menu-link-test_link sprite modify edit" title="summary">text</a>
+    <a class="menu-link-test_link sprite modify edit"
+       href="http://launchpad.dev/+place";
+       title="summary">text</a>
 
     >>> menu_link.icon = 'remove'
     >>> print test_tales('menu_link/fmt:link', menu_link=menu_link)
-    <a href="http://launchpad.dev/+place";
-       class="menu-link-test_link sprite modify remove"
-         title="summary">text</a>
+    <a class="menu-link-test_link sprite modify remove"
+       href="http://launchpad.dev/+place";
+       title="summary">text</a>
 
     >>> menu_link.icon = 'trash-icon'
     >>> print test_tales('menu_link/fmt:link', menu_link=menu_link)
-    <a href="http://launchpad.dev/+place";
-       class="menu-link-test_link sprite modify trash-icon"
-         title="summary">text</a>
+    <a class="menu-link-test_link sprite modify trash-icon"
+       href="http://launchpad.dev/+place";
+       title="summary">text</a>
 
 fmt:icon-link and fmt:link-icon are deprecated. They are an alias for
 fmt:link. They do not control formatting as they once did; fmt:link
@@ -1538,12 +1540,14 @@
 
     >>> menu_link.icon = 'icon'
     >>> print test_tales('menu_link/fmt:icon-link', menu_link=menu_link)
-    <a href="http://launchpad.dev/+place";
-       class="menu-link-test_link sprite icon" title="summary">text</a>
+    <a class="menu-link-test_link sprite icon"
+       href="http://launchpad.dev/+place";
+       title="summary">text</a>
 
     >>> print test_tales('menu_link/fmt:link-icon', menu_link=menu_link)
-    <a href="http://launchpad.dev/+place";
-       class="menu-link-test_link sprite icon" title="summary">text</a>
+    <a class="menu-link-test_link sprite icon"
+       href="http://launchpad.dev/+place";
+       title="summary">text</a>
 
 And the url format is also available.
 

=== modified file 'lib/lp/blueprints/stories/blueprints/xx-creation.txt'
--- lib/lp/blueprints/stories/blueprints/xx-creation.txt	2017-04-10 10:49:19 +0000
+++ lib/lp/blueprints/stories/blueprints/xx-creation.txt	2017-12-24 17:12:45 +0000
@@ -88,8 +88,9 @@
     >>> for tag in find_tags_by_class(
     ...     user_browser.contents, 'menu-link-new'):
     ...     print tag
-    <a href="http://blueprints.launchpad.dev/ubuntu/+addspec";
-       class="menu-link-new...>Register a blueprint</a>
+    <a class="menu-link-new..."
+       href="http://blueprints.launchpad.dev/ubuntu/+addspec";>Register
+       a blueprint</a>
 
 
 From a distribution series
@@ -104,8 +105,9 @@
     >>> for tag in find_tags_by_class(
     ...     user_browser.contents, 'menu-link-new'):
     ...     print tag
-    <a href="http://blueprints.launchpad.dev/ubuntu/hoary/+addspec";
-       class="menu-link-new...>Register a blueprint</a>
+    <a class="menu-link-new..."
+       href="http://blueprints.launchpad.dev/ubuntu/hoary/+addspec";>Register
+       a blueprint</a>
 
 
 From a product
@@ -121,8 +123,9 @@
     >>> for tag in find_tags_by_class(
     ...     user_browser.contents, 'menu-link-new'):
     ...     print tag
-    <a href="http://blueprints.launchpad.dev/bzr/+addspec";
-       class="menu-link-new...>Register a blueprint</a>
+    <a class="menu-link-new..."
+       href="http://blueprints.launchpad.dev/bzr/+addspec";>Register
+       a blueprint</a>
 
 For products without any blueprints, users can follow the special "register
 it here as a blueprint" link:
@@ -148,8 +151,9 @@
     >>> for tag in find_tags_by_class(
     ...     user_browser.contents, 'menu-link-new'):
     ...     print tag
-    <a href="http://blueprints.launchpad.dev/firefox/1.0/+addspec";
-       class="menu-link-new...>Register a blueprint</a>
+    <a class="menu-link-new..."
+       href="http://blueprints.launchpad.dev/firefox/1.0/+addspec";>Register
+       a blueprint</a>
 
 
 From a project
@@ -164,8 +168,9 @@
     >>> for tag in find_tags_by_class(
     ...     user_browser.contents, 'menu-link-new'):
     ...     print tag
-    <a href="http://blueprints.launchpad.dev/mozilla/+addspec";
-       class="menu-link-new...>Register a blueprint</a>
+    <a class="menu-link-new..."
+       href="http://blueprints.launchpad.dev/mozilla/+addspec";>Register
+       a blueprint</a>
 
 
 From a sprint
@@ -180,8 +185,9 @@
     >>> for tag in find_tags_by_class(
     ...     user_browser.contents, 'menu-link-new'):
     ...     print tag
-    <a href="http://blueprints.launchpad.dev/sprints/futurista/+addspec";
-       class="menu-link-new...>Register a blueprint</a>
+    <a class="menu-link-new..."
+     href="http://blueprints.launchpad.dev/sprints/futurista/+addspec";>Register
+       a blueprint</a>
 
 
 Registering a blueprint

=== modified file 'lib/lp/registry/browser/tests/person-views.txt'
--- lib/lp/registry/browser/tests/person-views.txt	2016-01-26 15:47:37 +0000
+++ lib/lp/registry/browser/tests/person-views.txt	2017-12-24 17:12:45 +0000
@@ -287,7 +287,7 @@
     >>> print view.render()
     <div id="working-on"...
     <a href="/~ken/+specs?role=assignee"> All assigned blueprints </a>...
-    ...<a href="http://blueprints.launchpad.dev/tool/+spec/...";...>Specs
+    ...<a ...href="http://blueprints.launchpad.dev/tool/+spec/...";...>Specs
       need stories</a>...
     </div>...
 
@@ -331,7 +331,7 @@
       does not work</a>...
     <a href="/~ken/+specs?role=assignee">
       All assigned blueprints </a>...
-    ...<a href="http://blueprints.launchpad.dev/tool/+spec/...";...>Specs
+    ...<a ...href="http://blueprints.launchpad.dev/tool/+spec/...";...>Specs
       need stories</a>...
     </div>...
 

=== modified file 'lib/lp/registry/browser/tests/pillar-views.txt'
--- lib/lp/registry/browser/tests/pillar-views.txt	2015-12-11 04:40:07 +0000
+++ lib/lp/registry/browser/tests/pillar-views.txt	2017-12-24 17:12:45 +0000
@@ -54,10 +54,10 @@
       <h2>Get Involved</h2>
       <ul class="involvement">
         <li>
-          <a href=... class="...bugs">Report a bug</a>...
+          <a class="...bugs" href=...>Report a bug</a>...
         </li>
         <li>
-          <a href=... class="...answers">Ask a question</a>...
+          <a class="...answers" href=...>Ask a question</a>...
         </li>
       </ul>
     ...
@@ -141,13 +141,13 @@
 
     >>> print find_tag_by_id(rendered, 'configuration_links')
     <table...
-    <a href="http://launchpad.dev/bread/+configure-code";...
+    <a ...href="http://launchpad.dev/bread/+configure-code";...
     <span class="sprite no action-icon">...
-    <a href="http://launchpad.dev/bread/+configure-bugtracker";...
+    <a ...href="http://launchpad.dev/bread/+configure-bugtracker";...
     <span class="sprite no action-icon">...    
-    <a href="http://launchpad.dev/bread/+configure-translations";...
+    <a ...href="http://launchpad.dev/bread/+configure-translations";...
     <span class="sprite yes action-icon">...
-    <a href="http://launchpad.dev/bread/+configure-answers";...
+    <a ...href="http://launchpad.dev/bread/+configure-answers";...
     <span class="sprite no action-icon">...
     </table>
 

=== modified file 'lib/lp/services/webapp/doc/menus.txt'
--- lib/lp/services/webapp/doc/menus.txt	2015-07-08 16:05:11 +0000
+++ lib/lp/services/webapp/doc/menus.txt	2017-12-24 17:12:45 +0000
@@ -868,8 +868,8 @@
     >>> html = test_tales('context/menu:foo/first/render',
     ...                   context=house, view=view, request=request)
     >>> print html #doctest: +NORMALIZE_WHITESPACE
-    <a...href="http://127.0.0.1/sesamestreet/number73/+first";
-    ...class="menu-link-first">First menu</a>
+    <a...class="menu-link-first"
+    ...href="http://127.0.0.1/sesamestreet/number73/+first";>First menu</a>
 
     # Clean up our special login.
 

=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt'
--- lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt	2009-07-01 20:45:39 +0000
+++ lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt	2017-12-24 17:12:45 +0000
@@ -47,7 +47,7 @@
 direction:
 
   >>> print find_tag_by_id(browser.contents, 'msgset_130_es_suggestion_562_0')
-  <label style="white-space: normal" lang="es"
-    id="msgset_130_es_suggestion_562_0" dir="ltr"
-    for="msgset_130_es_suggestion_562_0_radiobutton">libreta de
+  <label style="white-space: normal" dir="ltr"
+    for="msgset_130_es_suggestion_562_0_radiobutton"
+    id="msgset_130_es_suggestion_562_0" lang="es">libreta de
       direcciones de Evolution</label>

=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt'
--- lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt	2016-01-26 15:47:37 +0000
+++ lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt	2017-12-24 17:12:45 +0000
@@ -220,7 +220,7 @@
     >>> user_browser.getLink('Previous').click()
     >>> contents = find_main_content(user_browser.contents)
     >>> contents.find(text='fnord').parent
-    <div lang="en-AU"...id="msgset_1_en_AU_suggestion_..._0"...>fnord</div>
+    <div ... id="msgset_1_en_AU_suggestion_..._0" lang="en-AU">fnord</div>
 
 
 Messages changed in Ubuntu


Follow ups