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

Proposed by Colin Watson on 2017-12-24
Status: Merged
Merged at revision: 18563
Proposed branch: lp:~cjwatson/launchpad/zope.pagetemplate-4.3.0
Merge into: lp:launchpad
Prerequisite: lp:~cjwatson/launchpad/twisted-16.5.0
Diff against target: 477 lines (+91/-88)
12 files modified
constraints.txt (+8/-16)
lib/lp/answers/browser/tests/faq-views.txt (+1/-1)
lib/lp/app/browser/tests/menu.txt (+8/-7)
lib/lp/app/doc/lazr-js-widgets.txt (+8/-8)
lib/lp/app/doc/menus.txt (+14/-14)
lib/lp/app/doc/tales.txt (+20/-16)
lib/lp/blueprints/stories/blueprints/xx-creation.txt (+18/-12)
lib/lp/registry/browser/tests/person-views.txt (+2/-2)
lib/lp/registry/browser/tests/pillar-views.txt (+6/-6)
lib/lp/services/webapp/doc/menus.txt (+2/-2)
lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt (+3/-3)
lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt (+1/-1)
To merge this branch: bzr merge lp:~cjwatson/launchpad/zope.pagetemplate-4.3.0
Reviewer Review Type Date Requested Status
William Grant code 2017-12-24 Approve on 2018-01-30
Review via email: mp+335582@code.launchpad.net

Commit message

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

Description of the change

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.

To post a comment you must log in.
William Grant (wgrant) :
review: Approve (code)
18532. By Colin Watson on 2018-02-26

Merge devel.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'constraints.txt'
2--- constraints.txt 2018-02-26 12:22:07 +0000
3+++ constraints.txt 2018-02-26 14:19:56 +0000
4@@ -35,7 +35,8 @@
5 zope.filerepresentation==3.6.1
6 zope.formlib==4.0.6
7 zope.hookable==3.4.1
8-zope.i18n==3.7.4
9+#zope.i18n==3.7.4
10+zope.i18n==4.3.1
11 zope.i18nmessageid==3.5.3
12 zope.index==3.6.4
13 #zope.interface==3.7.0
14@@ -49,14 +50,7 @@
15 zope.mimetype==1.3.1
16 zope.minmax==1.1.2
17 #zope.pagetemplate==3.5.2
18-# Build of lp:~wallyworld/zope.pagetemplate/fix-isinstance
19-# p1 This version adds a small change to the traversal logic so that the
20-# optimisation which applies if the object is a dict also works for
21-# subclasses of dict. This patch has been merged in 4.2.0, so we can
22-# drop it when we upgrade.
23-# post2 Cherry-pick zope.security [untrustedpython] dependency from 3.5.1.
24-# Use PEP 440-compliant version.
25-zope.pagetemplate==3.5.0.post2
26+zope.pagetemplate==4.3.0
27 zope.password==3.6.1
28 zope.pluggableauth==1.2
29 zope.principalannotation==3.6.1
30@@ -67,11 +61,7 @@
31 zope.publisher==3.12.6
32 zope.ramcache==1.0
33 zope.schema==3.7.1
34-#zope.security==3.8.3
35-# Tell pip about extras to work around https://github.com/pypa/pip/issues/3046
36-# XXX cjwatson 2017-09-03: This should be fixed in pip 9.0.0, but apparently
37-# isn't.
38-zope.security[untrustedpython]==3.8.3
39+zope.security==3.8.3
40 zope.securitypolicy==3.7.0
41 zope.sendmail==3.7.5
42 zope.sequencesort==3.4.0
43@@ -82,7 +72,8 @@
44 zope.site==3.9.2
45 zope.size==3.4.1
46 zope.structuredtext==3.5.1
47-zope.tal==3.5.2
48+#zope.tal==3.5.2
49+zope.tal==4.3.0
50 zope.tales==3.5.3
51 #zope.testing==3.10.3
52 # p1 Build of lp:~mars/zope.testing/3.9.4-p1. Fixes bugs 570380 and 587886.
53@@ -131,7 +122,8 @@
54 py==1.4.8
55 #Pygments==1.4
56 Pygments==2.2.0
57-python-gettext==1.0
58+#python-gettext==1.0
59+python-gettext==3.0
60 #python-subunit==0.0.7
61 python-subunit==0.0.8beta
62 #pytz==2014.10
63
64=== modified file 'lib/lp/answers/browser/tests/faq-views.txt'
65--- lib/lp/answers/browser/tests/faq-views.txt 2012-07-09 03:31:31 +0000
66+++ lib/lp/answers/browser/tests/faq-views.txt 2018-02-26 14:19:56 +0000
67@@ -54,7 +54,7 @@
68 permission, such as the project owner.
69
70 >>> print content.find('a', {'class': 'menu-link-create_faq sprite add'})
71- <a href=".../firefox/+createfaq" class="...">Create a new FAQ</a>
72+ <a class="..." href=".../firefox/+createfaq">Create a new FAQ</a>
73
74 Other users do not see the link.
75
76
77=== modified file 'lib/lp/app/browser/tests/menu.txt'
78--- lib/lp/app/browser/tests/menu.txt 2015-07-08 16:05:11 +0000
79+++ lib/lp/app/browser/tests/menu.txt 2018-02-26 14:19:56 +0000
80@@ -80,15 +80,15 @@
81 <ul>
82 <BLANKLINE>
83 <li>
84- <a href="http://launchpad.dev/~beaker/+edit"
85- class="menu-link-edit_thing
86- sprite modify edit">Edit thing</a>
87+ <a class="menu-link-edit_thing sprite modify edit"
88+ href="http://launchpad.dev/~beaker/+edit">Edit thing</a>
89 </li>
90 <BLANKLINE>
91 <BLANKLINE>
92 <li>
93- <a href="http://launchpad.dev/~beaker/+edit-people"
94- class="menu-link-edit_people">Edit people related to thing</a>
95+ <a class="menu-link-edit_people"
96+ href="http://launchpad.dev/~beaker/+edit-people">Edit
97+ people related to thing</a>
98 </li>
99 ...
100 </div>
101@@ -147,8 +147,9 @@
102 sprite modify edit">Edit thing</span>
103 </li>
104 <li>
105- <a href="http://launchpad.dev/~beaker/+edit-people"
106- class="menu-link-edit_people">Edit people related to thing</a>
107+ <a class="menu-link-edit_people"
108+ href="http://launchpad.dev/~beaker/+edit-people">Edit
109+ people related to thing</a>
110 </li>
111 </ul>
112 </div>
113
114=== modified file 'lib/lp/app/doc/lazr-js-widgets.txt'
115--- lib/lp/app/doc/lazr-js-widgets.txt 2015-10-01 17:32:41 +0000
116+++ lib/lp/app/doc/lazr-js-widgets.txt 2018-02-26 14:19:56 +0000
117@@ -37,8 +37,8 @@
118
119 >>> print widget()
120 <h1 id="edit-display_name">
121- <span style="max-width: 90%;"
122- class="yui3-editable_text-text ellipsis">
123+ <span class="yui3-editable_text-text ellipsis"
124+ style="max-width: 90%;">
125 Widgets &gt; important
126 </span>
127 </h1>
128@@ -50,8 +50,8 @@
129 >>> ignored = login_person(product.owner)
130 >>> print widget()
131 <h1 id="edit-display_name">
132- <span style="max-width: 90%;"
133- class="yui3-editable_text-text ellipsis">
134+ <span class="yui3-editable_text-text ellipsis"
135+ style="max-width: 90%;">
136 Widgets &gt; important
137 </span>
138 <a class="yui3-editable_text-trigger sprite edit action-icon"
139@@ -151,7 +151,7 @@
140 >>> login(ANONYMOUS)
141 >>> print widget()
142 <div>
143- <div id="edit-description" class="lazr-multiline-edit">
144+ <div class="lazr-multiline-edit" id="edit-description">
145 <div class="clearfix">
146 <h3>A title</h3>
147 </div>
148@@ -170,7 +170,7 @@
149 >>> ignored = login_person(eric)
150 >>> print widget()
151 <div>
152- <div id="edit-description" class="lazr-multiline-edit">
153+ <div class="lazr-multiline-edit" id="edit-description">
154 <div class="clearfix">
155 <div class="edit-controls">
156 <a class="yui3-editable_text-trigger sprite edit action-icon"
157@@ -209,7 +209,7 @@
158 >>> clear_property_cache(widget)
159 >>> print widget()
160 <div>
161- <div id="edit-description" class="lazr-multiline-edit hidden">
162+ <div class="lazr-multiline-edit hidden" id="edit-description">
163 ...
164
165 This behaviour can be overridden by setting the "hide_empty" parameter to
166@@ -219,7 +219,7 @@
167 ... archive, description, 'A title', hide_empty=False)
168 >>> print widget()
169 <div>
170- <div id="edit-description" class="lazr-multiline-edit">
171+ <div class="lazr-multiline-edit" id="edit-description">
172 ...
173
174
175
176=== modified file 'lib/lp/app/doc/menus.txt'
177--- lib/lp/app/doc/menus.txt 2016-01-26 15:47:37 +0000
178+++ lib/lp/app/doc/menus.txt 2018-02-26 14:19:56 +0000
179@@ -1152,16 +1152,16 @@
180 <div>
181 <ul>
182 <li>
183- <a href=".../joy-of-cooking/fried-spam"
184- class="selected-True">Summary</a>
185- </li>
186- <li>
187- <a href=".../joy-of-cooking/fried-spam/+questions"
188- class="selected-False">Questions</a>
189- </li>
190- <li>
191- <a href=".../joy-of-cooking/fried-spam/+variations"
192- class="selected-False">Variations</a>
193+ <a class="selected-True"
194+ href=".../joy-of-cooking/fried-spam">Summary</a>
195+ </li>
196+ <li>
197+ <a class="selected-False"
198+ href=".../joy-of-cooking/fried-spam/+questions">Questions</a>
199+ </li>
200+ <li>
201+ <a class="selected-False"
202+ href=".../joy-of-cooking/fried-spam/+variations">Variations</a>
203 </li>
204 </ul>
205 </div>
206@@ -1175,8 +1175,8 @@
207 <div>
208 <ul>
209 <li>
210- <a href=".../joy-of-cooking/fried-spam"
211- class="selected-None">Summary</a>
212+ <a class="selected-None"
213+ href=".../joy-of-cooking/fried-spam">Summary</a>
214 </li>
215 <li>
216 <strong>Journal</strong>
217@@ -1201,8 +1201,8 @@
218 <strong>Read Journal entries</strong>
219 </li>
220 <li>
221- <a href=".../joy-of-cooking/fried-spam/+write-entry"
222- class="selected-None">Write
223+ <a class="selected-None"
224+ href=".../joy-of-cooking/fried-spam/+write-entry">Write
225 a journal entry</a>
226 </li>
227 </ul>
228
229=== modified file 'lib/lp/app/doc/tales.txt'
230--- lib/lp/app/doc/tales.txt 2017-10-21 18:14:14 +0000
231+++ lib/lp/app/doc/tales.txt 2018-02-26 14:19:56 +0000
232@@ -1501,36 +1501,38 @@
233 The link can be rendered as an anchored icon.
234
235 >>> print test_tales('menu_link/fmt:icon', menu_link=menu_link)
236- <a href="http://launchpad.dev/+place"
237- class="menu-link-test_link sprite icon action-icon"
238+ <a class="menu-link-test_link sprite icon action-icon"
239+ href="http://launchpad.dev/+place"
240 title="summary">text</a>
241
242 The default rendering can be explicitly called too, text with an icon to
243 the left.
244
245 >>> print test_tales('menu_link/fmt:link', menu_link=menu_link)
246- <a href="http://launchpad.dev/+place"
247- class="menu-link-test_link sprite icon" title="summary">text</a>
248+ <a class="menu-link-test_link sprite icon"
249+ href="http://launchpad.dev/+place"
250+ title="summary">text</a>
251
252 The 'edit', 'remove' and 'trash-icon' links are rendered icons followed
253 by text. They have both the sprite and modify CSS classes.
254
255 >>> menu_link.icon = 'edit'
256 >>> print test_tales('menu_link/fmt:link', menu_link=menu_link)
257- <a href="http://launchpad.dev/+place"
258- class="menu-link-test_link sprite modify edit" title="summary">text</a>
259+ <a class="menu-link-test_link sprite modify edit"
260+ href="http://launchpad.dev/+place"
261+ title="summary">text</a>
262
263 >>> menu_link.icon = 'remove'
264 >>> print test_tales('menu_link/fmt:link', menu_link=menu_link)
265- <a href="http://launchpad.dev/+place"
266- class="menu-link-test_link sprite modify remove"
267- title="summary">text</a>
268+ <a class="menu-link-test_link sprite modify remove"
269+ href="http://launchpad.dev/+place"
270+ title="summary">text</a>
271
272 >>> menu_link.icon = 'trash-icon'
273 >>> print test_tales('menu_link/fmt:link', menu_link=menu_link)
274- <a href="http://launchpad.dev/+place"
275- class="menu-link-test_link sprite modify trash-icon"
276- title="summary">text</a>
277+ <a class="menu-link-test_link sprite modify trash-icon"
278+ href="http://launchpad.dev/+place"
279+ title="summary">text</a>
280
281 fmt:icon-link and fmt:link-icon are deprecated. They are an alias for
282 fmt:link. They do not control formatting as they once did; fmt:link
283@@ -1538,12 +1540,14 @@
284
285 >>> menu_link.icon = 'icon'
286 >>> print test_tales('menu_link/fmt:icon-link', menu_link=menu_link)
287- <a href="http://launchpad.dev/+place"
288- class="menu-link-test_link sprite icon" title="summary">text</a>
289+ <a class="menu-link-test_link sprite icon"
290+ href="http://launchpad.dev/+place"
291+ title="summary">text</a>
292
293 >>> print test_tales('menu_link/fmt:link-icon', menu_link=menu_link)
294- <a href="http://launchpad.dev/+place"
295- class="menu-link-test_link sprite icon" title="summary">text</a>
296+ <a class="menu-link-test_link sprite icon"
297+ href="http://launchpad.dev/+place"
298+ title="summary">text</a>
299
300 And the url format is also available.
301
302
303=== modified file 'lib/lp/blueprints/stories/blueprints/xx-creation.txt'
304--- lib/lp/blueprints/stories/blueprints/xx-creation.txt 2017-04-10 10:49:19 +0000
305+++ lib/lp/blueprints/stories/blueprints/xx-creation.txt 2018-02-26 14:19:56 +0000
306@@ -88,8 +88,9 @@
307 >>> for tag in find_tags_by_class(
308 ... user_browser.contents, 'menu-link-new'):
309 ... print tag
310- <a href="http://blueprints.launchpad.dev/ubuntu/+addspec"
311- class="menu-link-new...>Register a blueprint</a>
312+ <a class="menu-link-new..."
313+ href="http://blueprints.launchpad.dev/ubuntu/+addspec">Register
314+ a blueprint</a>
315
316
317 From a distribution series
318@@ -104,8 +105,9 @@
319 >>> for tag in find_tags_by_class(
320 ... user_browser.contents, 'menu-link-new'):
321 ... print tag
322- <a href="http://blueprints.launchpad.dev/ubuntu/hoary/+addspec"
323- class="menu-link-new...>Register a blueprint</a>
324+ <a class="menu-link-new..."
325+ href="http://blueprints.launchpad.dev/ubuntu/hoary/+addspec">Register
326+ a blueprint</a>
327
328
329 From a product
330@@ -121,8 +123,9 @@
331 >>> for tag in find_tags_by_class(
332 ... user_browser.contents, 'menu-link-new'):
333 ... print tag
334- <a href="http://blueprints.launchpad.dev/bzr/+addspec"
335- class="menu-link-new...>Register a blueprint</a>
336+ <a class="menu-link-new..."
337+ href="http://blueprints.launchpad.dev/bzr/+addspec">Register
338+ a blueprint</a>
339
340 For products without any blueprints, users can follow the special "register
341 it here as a blueprint" link:
342@@ -148,8 +151,9 @@
343 >>> for tag in find_tags_by_class(
344 ... user_browser.contents, 'menu-link-new'):
345 ... print tag
346- <a href="http://blueprints.launchpad.dev/firefox/1.0/+addspec"
347- class="menu-link-new...>Register a blueprint</a>
348+ <a class="menu-link-new..."
349+ href="http://blueprints.launchpad.dev/firefox/1.0/+addspec">Register
350+ a blueprint</a>
351
352
353 From a project
354@@ -164,8 +168,9 @@
355 >>> for tag in find_tags_by_class(
356 ... user_browser.contents, 'menu-link-new'):
357 ... print tag
358- <a href="http://blueprints.launchpad.dev/mozilla/+addspec"
359- class="menu-link-new...>Register a blueprint</a>
360+ <a class="menu-link-new..."
361+ href="http://blueprints.launchpad.dev/mozilla/+addspec">Register
362+ a blueprint</a>
363
364
365 From a sprint
366@@ -180,8 +185,9 @@
367 >>> for tag in find_tags_by_class(
368 ... user_browser.contents, 'menu-link-new'):
369 ... print tag
370- <a href="http://blueprints.launchpad.dev/sprints/futurista/+addspec"
371- class="menu-link-new...>Register a blueprint</a>
372+ <a class="menu-link-new..."
373+ href="http://blueprints.launchpad.dev/sprints/futurista/+addspec">Register
374+ a blueprint</a>
375
376
377 Registering a blueprint
378
379=== modified file 'lib/lp/registry/browser/tests/person-views.txt'
380--- lib/lp/registry/browser/tests/person-views.txt 2016-01-26 15:47:37 +0000
381+++ lib/lp/registry/browser/tests/person-views.txt 2018-02-26 14:19:56 +0000
382@@ -287,7 +287,7 @@
383 >>> print view.render()
384 <div id="working-on"...
385 <a href="/~ken/+specs?role=assignee"> All assigned blueprints </a>...
386- ...<a href="http://blueprints.launchpad.dev/tool/+spec/..."...>Specs
387+ ...<a ...href="http://blueprints.launchpad.dev/tool/+spec/..."...>Specs
388 need stories</a>...
389 </div>...
390
391@@ -331,7 +331,7 @@
392 does not work</a>...
393 <a href="/~ken/+specs?role=assignee">
394 All assigned blueprints </a>...
395- ...<a href="http://blueprints.launchpad.dev/tool/+spec/..."...>Specs
396+ ...<a ...href="http://blueprints.launchpad.dev/tool/+spec/..."...>Specs
397 need stories</a>...
398 </div>...
399
400
401=== modified file 'lib/lp/registry/browser/tests/pillar-views.txt'
402--- lib/lp/registry/browser/tests/pillar-views.txt 2015-12-11 04:40:07 +0000
403+++ lib/lp/registry/browser/tests/pillar-views.txt 2018-02-26 14:19:56 +0000
404@@ -54,10 +54,10 @@
405 <h2>Get Involved</h2>
406 <ul class="involvement">
407 <li>
408- <a href=... class="...bugs">Report a bug</a>...
409+ <a class="...bugs" href=...>Report a bug</a>...
410 </li>
411 <li>
412- <a href=... class="...answers">Ask a question</a>...
413+ <a class="...answers" href=...>Ask a question</a>...
414 </li>
415 </ul>
416 ...
417@@ -141,13 +141,13 @@
418
419 >>> print find_tag_by_id(rendered, 'configuration_links')
420 <table...
421- <a href="http://launchpad.dev/bread/+configure-code"...
422+ <a ...href="http://launchpad.dev/bread/+configure-code"...
423 <span class="sprite no action-icon">...
424- <a href="http://launchpad.dev/bread/+configure-bugtracker"...
425+ <a ...href="http://launchpad.dev/bread/+configure-bugtracker"...
426 <span class="sprite no action-icon">...
427- <a href="http://launchpad.dev/bread/+configure-translations"...
428+ <a ...href="http://launchpad.dev/bread/+configure-translations"...
429 <span class="sprite yes action-icon">...
430- <a href="http://launchpad.dev/bread/+configure-answers"...
431+ <a ...href="http://launchpad.dev/bread/+configure-answers"...
432 <span class="sprite no action-icon">...
433 </table>
434
435
436=== modified file 'lib/lp/services/webapp/doc/menus.txt'
437--- lib/lp/services/webapp/doc/menus.txt 2015-07-08 16:05:11 +0000
438+++ lib/lp/services/webapp/doc/menus.txt 2018-02-26 14:19:56 +0000
439@@ -868,8 +868,8 @@
440 >>> html = test_tales('context/menu:foo/first/render',
441 ... context=house, view=view, request=request)
442 >>> print html #doctest: +NORMALIZE_WHITESPACE
443- <a...href="http://127.0.0.1/sesamestreet/number73/+first"
444- ...class="menu-link-first">First menu</a>
445+ <a...class="menu-link-first"
446+ ...href="http://127.0.0.1/sesamestreet/number73/+first">First menu</a>
447
448 # Clean up our special login.
449
450
451=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt'
452--- lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt 2009-07-01 20:45:39 +0000
453+++ lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt 2018-02-26 14:19:56 +0000
454@@ -47,7 +47,7 @@
455 direction:
456
457 >>> print find_tag_by_id(browser.contents, 'msgset_130_es_suggestion_562_0')
458- <label style="white-space: normal" lang="es"
459- id="msgset_130_es_suggestion_562_0" dir="ltr"
460- for="msgset_130_es_suggestion_562_0_radiobutton">libreta de
461+ <label style="white-space: normal" dir="ltr"
462+ for="msgset_130_es_suggestion_562_0_radiobutton"
463+ id="msgset_130_es_suggestion_562_0" lang="es">libreta de
464 direcciones de Evolution</label>
465
466=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt'
467--- lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt 2016-01-26 15:47:37 +0000
468+++ lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt 2018-02-26 14:19:56 +0000
469@@ -220,7 +220,7 @@
470 >>> user_browser.getLink('Previous').click()
471 >>> contents = find_main_content(user_browser.contents)
472 >>> contents.find(text='fnord').parent
473- <div lang="en-AU"...id="msgset_1_en_AU_suggestion_..._0"...>fnord</div>
474+ <div ... id="msgset_1_en_AU_suggestion_..._0" lang="en-AU">fnord</div>
475
476
477 Messages changed in Ubuntu