-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Branch: refs/heads/master Date: 2016-01-28T16:34:32+01:00 Author: Johannes Raggam (thet) <thetetet@gmail.com> Commit: plone/plone.app.upgrade@4594d9f Fix cleanUpProductRegistry to not break when Control_Panel cannot be found. Fixes test failures with Zope 4. Files changed: M CHANGES.rst M plone/app/upgrade/v40/alphas.py Repository: plone.app.upgrade Branch: refs/heads/master Date: 2016-01-29T02:23:42+01:00 Author: Johannes Raggam (thet) <thetetet@gmail.com> Commit: plone/plone.app.upgrade@558e507 Merge pull request #66 from plone/thet-zope4 Zope4 Files changed: M CHANGES.rst M plone/app/upgrade/v40/alphas.py
- Loading branch information
Showing
1 changed file
with
62 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,114 @@ | ||
Repository: plone.app.layout | ||
Repository: plone.app.upgrade | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2016-01-28T12:28:11+01:00 | ||
Date: 2016-01-28T16:34:32+01:00 | ||
Author: Johannes Raggam (thet) <thetetet@gmail.com> | ||
Commit: https://github.com/plone/plone.app.layout/commit/845da052d5afc320b94befcd61a3436fbcd353cf | ||
Commit: https://github.com/plone/plone.app.upgrade/commit/4594d9f80708ecee3af5afde17a8f05675c00989 | ||
|
||
Adapt to changed Zope 4 broser:view semantics. We either need a template ZCML argument or a __call__ method on the class. | ||
Fix cleanUpProductRegistry to not break when Control_Panel cannot be found. Fixes test failures with Zope 4. | ||
|
||
Files changed: | ||
M CHANGES.rst | ||
M plone/app/layout/viewlets/content.py | ||
M plone/app/upgrade/v40/alphas.py | ||
|
||
diff --git a/CHANGES.rst b/CHANGES.rst | ||
index a12afb1..26827e5 100644 | ||
index b182d9b..c774eca 100644 | ||
--- a/CHANGES.rst | ||
+++ b/CHANGES.rst | ||
@@ -11,7 +11,8 @@ New: | ||
@@ -10,7 +10,9 @@ New: | ||
|
||
Fixes: | ||
|
||
-- *add item here* | ||
+- Adapt to changed Zope 4 ``broser:view`` semantics. We either need a ``template`` ZCML argument or a ``__call__`` method on the class. | ||
+- Fix ``cleanUpProductRegistry`` to not break when ``Control_Panel`` cannot be found. | ||
+ Fixes test failures with Zope 4. | ||
+ [thet] | ||
|
||
|
||
2.5.17 (2015-11-26) | ||
diff --git a/plone/app/layout/viewlets/content.py b/plone/app/layout/viewlets/content.py | ||
index 615d78f..e9afc21 100644 | ||
--- a/plone/app/layout/viewlets/content.py | ||
+++ b/plone/app/layout/viewlets/content.py | ||
@@ -511,8 +511,9 @@ def toLocalizedTime(self, time, long_format=None, time_only=None): | ||
1.3.20 (2016-01-08) | ||
diff --git a/plone/app/upgrade/v40/alphas.py b/plone/app/upgrade/v40/alphas.py | ||
index a5abb63..a43fbd7 100644 | ||
--- a/plone/app/upgrade/v40/alphas.py | ||
+++ b/plone/app/upgrade/v40/alphas.py | ||
@@ -385,12 +385,14 @@ def cleanUpSkinsTool(context): | ||
|
||
class ContentHistoryView(ContentHistoryViewlet): | ||
|
||
- index = ViewPageTemplateFile("content_history.pt") | ||
def cleanUpProductRegistry(context): | ||
- control = getattr(context, 'Control_Panel') | ||
- products = control.Products | ||
- | ||
def __init__(self, context, request): | ||
super(ContentHistoryView, self).__init__(context, request, None, None) | ||
self.update() | ||
- # Remove all product entries | ||
- for name in products.keys(): | ||
- products._delObject(name) | ||
+ control = getattr(context, 'Control_Panel', None) | ||
+ if control: | ||
+ products = control.Products | ||
+ | ||
+ def __call__(self): | ||
+ return self.index() | ||
+ # Remove all product entries | ||
+ for name in products.keys(): | ||
+ products._delObject(name) | ||
+ # else: pass # Zope 4 doesn't have the Control_Panel anymore | ||
|
||
|
||
def migrateStaticTextPortlets(context): | ||
|
||
|
||
Repository: plone.app.layout | ||
Repository: plone.app.upgrade | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2016-01-29T02:23:13+01:00 | ||
Date: 2016-01-29T02:23:42+01:00 | ||
Author: Johannes Raggam (thet) <thetetet@gmail.com> | ||
Commit: https://github.com/plone/plone.app.layout/commit/3961968cb836896a3eabd3341bc11afcce85c26c | ||
Commit: https://github.com/plone/plone.app.upgrade/commit/558e507f2625656de9295396f4c63ad462556e7b | ||
|
||
Merge pull request #77 from plone/thet-zope4 | ||
Merge pull request #66 from plone/thet-zope4 | ||
|
||
Zope4 | ||
|
||
Files changed: | ||
M CHANGES.rst | ||
M plone/app/layout/viewlets/content.py | ||
M plone/app/upgrade/v40/alphas.py | ||
|
||
diff --git a/CHANGES.rst b/CHANGES.rst | ||
index a12afb1..26827e5 100644 | ||
index b182d9b..c774eca 100644 | ||
--- a/CHANGES.rst | ||
+++ b/CHANGES.rst | ||
@@ -11,7 +11,8 @@ New: | ||
@@ -10,7 +10,9 @@ New: | ||
|
||
Fixes: | ||
|
||
-- *add item here* | ||
+- Adapt to changed Zope 4 ``broser:view`` semantics. We either need a ``template`` ZCML argument or a ``__call__`` method on the class. | ||
+- Fix ``cleanUpProductRegistry`` to not break when ``Control_Panel`` cannot be found. | ||
+ Fixes test failures with Zope 4. | ||
+ [thet] | ||
|
||
|
||
2.5.17 (2015-11-26) | ||
diff --git a/plone/app/layout/viewlets/content.py b/plone/app/layout/viewlets/content.py | ||
index 615d78f..e9afc21 100644 | ||
--- a/plone/app/layout/viewlets/content.py | ||
+++ b/plone/app/layout/viewlets/content.py | ||
@@ -511,8 +511,9 @@ def toLocalizedTime(self, time, long_format=None, time_only=None): | ||
1.3.20 (2016-01-08) | ||
diff --git a/plone/app/upgrade/v40/alphas.py b/plone/app/upgrade/v40/alphas.py | ||
index a5abb63..a43fbd7 100644 | ||
--- a/plone/app/upgrade/v40/alphas.py | ||
+++ b/plone/app/upgrade/v40/alphas.py | ||
@@ -385,12 +385,14 @@ def cleanUpSkinsTool(context): | ||
|
||
class ContentHistoryView(ContentHistoryViewlet): | ||
|
||
- index = ViewPageTemplateFile("content_history.pt") | ||
def cleanUpProductRegistry(context): | ||
- control = getattr(context, 'Control_Panel') | ||
- products = control.Products | ||
- | ||
def __init__(self, context, request): | ||
super(ContentHistoryView, self).__init__(context, request, None, None) | ||
self.update() | ||
- # Remove all product entries | ||
- for name in products.keys(): | ||
- products._delObject(name) | ||
+ control = getattr(context, 'Control_Panel', None) | ||
+ if control: | ||
+ products = control.Products | ||
+ | ||
+ def __call__(self): | ||
+ return self.index() | ||
+ # Remove all product entries | ||
+ for name in products.keys(): | ||
+ products._delObject(name) | ||
+ # else: pass # Zope 4 doesn't have the Control_Panel anymore | ||
|
||
|
||
def migrateStaticTextPortlets(context): | ||
|
||
|