-
-
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: 2018-10-29T23:07:00+01:00 Author: ale-rt (ale-rt) <alessandro.pisa@gmail.com> Commit: plone/plone.app.z3cform@c93d73b Fix deprecation warning Fixes plone/Products.CMFPlone#2605 Files changed: M CHANGES.rst M plone/app/z3cform/wysiwyg/widget.py Repository: plone.app.z3cform Branch: refs/heads/master Date: 2018-10-30T15:17:59+01:00 Author: Alessandro Pisa (ale-rt) <alessandro.pisa@gmail.com> Commit: plone/plone.app.z3cform@055c352 Merge pull request #97 from plone/fix-deprecation Fix deprecation warning Files changed: M CHANGES.rst M plone/app/z3cform/wysiwyg/widget.py
- Loading branch information
Showing
1 changed file
with
16 additions
and
48 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,68 +1,36 @@ | ||
Repository: plone.contentrules | ||
Repository: plone.app.z3cform | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2018-10-26T16:21:31+02:00 | ||
Author: Philip Bauer (pbauer) <bauer@starzel.de> | ||
Commit: https://github.com/plone/plone.contentrules/commit/dabd848c44e3f0ab00f76144ac0f97ba92c50a31 | ||
Date: 2018-10-29T23:07:00+01:00 | ||
Author: ale-rt (ale-rt) <alessandro.pisa@gmail.com> | ||
Commit: https://github.com/plone/plone.app.z3cform/commit/c93d73bda963e94523f860caa648c4b47832c432 | ||
|
||
fix tests with new persistent | ||
Fix deprecation warning | ||
|
||
Files changed: | ||
M plone/contentrules/README.rst | ||
M plone/contentrules/tests.py | ||
M plone/contentrules/zcml.rst | ||
|
||
b'diff --git a/plone/contentrules/README.rst b/plone/contentrules/README.rst\nindex d2db5f0..d2fa838 100644\n--- a/plone/contentrules/README.rst\n+++ b/plone/contentrules/README.rst\n@@ -307,7 +307,7 @@ instance of this rule element.\n >>> configuredAction = MoveToFolderAction()\n >>> configuredAction.targetFolder = "/foo"\n >>> configuredAction\n- <MoveToFolderAction object at ...>\n+ <builtins.MoveToFolderAction object at ...>\n \n The element, once created, now needs to be saved as part of a rule.\n \n@@ -399,7 +399,7 @@ After being saved, it will be given a name and parentage.\n \n >>> ruleStorage[u\'testRule\'] = testRule\n >>> testRule.__name__\n- u\'testRule\'\n+ \'testRule\'\n >>> testRule.__parent__ is ruleStorage\n True\n \ndiff --git a/plone/contentrules/tests.py b/plone/contentrules/tests.py\nindex b31d21b..fa76554 100644\n--- a/plone/contentrules/tests.py\n+++ b/plone/contentrules/tests.py\n@@ -13,8 +13,9 @@\n class Py23DocChecker(doctest.OutputChecker):\n \n def check_output(self, want, got, optionflags):\n- if not six.PY2:\n- want = re.sub("u\'(.*?)\'", "\'\\\\1\'", want)\n+ if six.PY2:\n+ got = re.sub("u\'(.*?)\'", "\'\\\\1\'", got)\n+ want = re.sub(\'<builtins.MoveToFolderAction \', \'<MoveToFolderAction \', want)\n return doctest.OutputChecker.check_output(self, want, got, optionflags)\n \n \ndiff --git a/plone/contentrules/zcml.rst b/plone/contentrules/zcml.rst\nindex 2f47597..76d023f 100644\n--- a/plone/contentrules/zcml.rst\n+++ b/plone/contentrules/zcml.rst\n@@ -71,17 +71,17 @@ inspect conditions and actions in rules.\n \n >>> condition = getUtility(IRuleCondition, name=u"test.condition")\n >>> condition.title\n- u\'Test condition\'\n+ \'Test condition\'\n >>> condition.description\n- u\'A test condition\'\n+ \'A test condition\'\n >>> condition.for_ == None\n True\n >>> condition.event == IObjectEvent\n True\n >>> condition.addview\n- u\'test.condition\'\n+ \'test.condition\'\n >>> condition.editview\n- u\'edit\'\n+ \'edit\'\n >>> condition.schema == elements.ITestCondition\n True\n >>> condition.factory == elements.TestCondition\n@@ -89,17 +89,17 @@ inspect conditions and actions in rules.\n \n >>> action = getUtility(IRuleAction, name=u"test.action")\n >>> action.title\n- u\'Test action\'\n+ \'Test action\'\n >>> action.description\n- u\'A test action\'\n+ \'A test action\'\n >>> action.for_ == None\n True\n >>> action.event == IObjectEvent\n True\n >>> action.addview\n- u\'test.action\'\n+ \'test.action\'\n >>> action.editview\n- u\'edit\'\n+ \'edit\'\n >>> action.schema == elements.ITestAction\n True\n >>> action.factory == elements.TestAction\n' | ||
|
||
Repository: plone.contentrules | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2018-10-26T16:27:05+02:00 | ||
Author: Philip Bauer (pbauer) <bauer@starzel.de> | ||
Commit: https://github.com/plone/plone.contentrules/commit/d1d370c7f0cb822ae16dc6c79a698c5b4c81992d | ||
|
||
do not rely on __repr__ in doctest | ||
|
||
Files changed: | ||
M plone/contentrules/README.rst | ||
M plone/contentrules/tests.py | ||
|
||
b'diff --git a/plone/contentrules/README.rst b/plone/contentrules/README.rst\nindex d2fa838..81fcd79 100644\n--- a/plone/contentrules/README.rst\n+++ b/plone/contentrules/README.rst\n@@ -306,8 +306,8 @@ instance of this rule element.\n \n >>> configuredAction = MoveToFolderAction()\n >>> configuredAction.targetFolder = "/foo"\n- >>> configuredAction\n- <builtins.MoveToFolderAction object at ...>\n+ >>> configuredAction.__class__.__name__\n+ \'MoveToFolderAction\'\n \n The element, once created, now needs to be saved as part of a rule.\n \ndiff --git a/plone/contentrules/tests.py b/plone/contentrules/tests.py\nindex fa76554..5f05b4f 100644\n--- a/plone/contentrules/tests.py\n+++ b/plone/contentrules/tests.py\n@@ -15,7 +15,6 @@ class Py23DocChecker(doctest.OutputChecker):\n def check_output(self, want, got, optionflags):\n if six.PY2:\n got = re.sub("u\'(.*?)\'", "\'\\\\1\'", got)\n- want = re.sub(\'<builtins.MoveToFolderAction \', \'<MoveToFolderAction \', want)\n return doctest.OutputChecker.check_output(self, want, got, optionflags)\n \n \n' | ||
|
||
Repository: plone.contentrules | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2018-10-28T11:37:02+01:00 | ||
Author: Philip Bauer (pbauer) <bauer@starzel.de> | ||
Commit: https://github.com/plone/plone.contentrules/commit/901a5f16a633037abae0b2398569900c61b3edbb | ||
|
||
add changenote | ||
Fixes https://github.com/plone/Products.CMFPlone/issues/2605 | ||
|
||
Files changed: | ||
M CHANGES.rst | ||
M plone/app/z3cform/wysiwyg/widget.py | ||
|
||
b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 8d01f87..b790ef5 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -14,7 +14,8 @@ New features:\n \n Bug fixes:\n \n-- *add item here*\n+- Fix tests to not rely on a specific `__repr__` of MoveToFolderAction and make py3 the default in test-output.\n+ [pbauer]\n \n \n 2.0.8 (2018-09-27)\n' | ||
b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 148a49c..c854060 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -14,7 +14,8 @@ New features:\n \n Bug fixes:\n \n-- *add item here*\n+- Fix deprecation warning\n+ (https://github.com/plone/Products.CMFPlone/issues/2605) [ale-rt]\n \n \n 3.0.6 (2018-09-27)\ndiff --git a/plone/app/z3cform/wysiwyg/widget.py b/plone/app/z3cform/wysiwyg/widget.py\nindex 1f9e134..bbba908 100644\n--- a/plone/app/z3cform/wysiwyg/widget.py\n+++ b/plone/app/z3cform/wysiwyg/widget.py\n@@ -6,6 +6,7 @@\n \n import Acquisition\n import logging\n+import warnings\n import z3c.form.browser.textarea\n import z3c.form.interfaces\n import z3c.form.widget\n@@ -43,7 +44,7 @@ def update(self):\n @implementer(z3c.form.interfaces.IFieldWidget)\n def WysiwygFieldWidget(field, request):\n """IFieldWidget factory for WysiwygWidget."""\n- logger.warn(\n+ warnings.warn(\n \'plone.app.z3cform.wysiwyg.WysiwygFieldWidget is deprecated and\'\n \'will be removed in Plone 5.1\',\n DeprecationWarning,\n' | ||
|
||
Repository: plone.contentrules | ||
Repository: plone.app.z3cform | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2018-10-28T13:25:50+01:00 | ||
Author: Philip Bauer (pbauer) <bauer@starzel.de> | ||
Commit: https://github.com/plone/plone.contentrules/commit/6cffb68cb1758e220e26533c1af46ed286a3775c | ||
Date: 2018-10-30T15:17:59+01:00 | ||
Author: Alessandro Pisa (ale-rt) <alessandro.pisa@gmail.com> | ||
Commit: https://github.com/plone/plone.app.z3cform/commit/055c352a344f956ff0a3d543a028972af3dcaa46 | ||
|
||
Merge pull request #9 from plone/fix_tests | ||
Merge pull request #97 from plone/fix-deprecation | ||
|
||
Fix tests in 5.2 | ||
Fix deprecation warning | ||
|
||
Files changed: | ||
M CHANGES.rst | ||
M plone/contentrules/README.rst | ||
M plone/contentrules/tests.py | ||
M plone/contentrules/zcml.rst | ||
M plone/app/z3cform/wysiwyg/widget.py | ||
|
||
b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 8d01f87..b790ef5 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -14,7 +14,8 @@ New features:\n \n Bug fixes:\n \n-- *add item here*\n+- Fix tests to not rely on a specific `__repr__` of MoveToFolderAction and make py3 the default in test-output.\n+ [pbauer]\n \n \n 2.0.8 (2018-09-27)\ndiff --git a/plone/contentrules/README.rst b/plone/contentrules/README.rst\nindex d2db5f0..81fcd79 100644\n--- a/plone/contentrules/README.rst\n+++ b/plone/contentrules/README.rst\n@@ -306,8 +306,8 @@ instance of this rule element.\n \n >>> configuredAction = MoveToFolderAction()\n >>> configuredAction.targetFolder = "/foo"\n- >>> configuredAction\n- <MoveToFolderAction object at ...>\n+ >>> configuredAction.__class__.__name__\n+ \'MoveToFolderAction\'\n \n The element, once created, now needs to be saved as part of a rule.\n \n@@ -399,7 +399,7 @@ After being saved, it will be given a name and parentage.\n \n >>> ruleStorage[u\'testRule\'] = testRule\n >>> testRule.__name__\n- u\'testRule\'\n+ \'testRule\'\n >>> testRule.__parent__ is ruleStorage\n True\n \ndiff --git a/plone/contentrules/tests.py b/plone/contentrules/tests.py\nindex b31d21b..5f05b4f 100644\n--- a/plone/contentrules/tests.py\n+++ b/plone/contentrules/tests.py\n@@ -13,8 +13,8 @@\n class Py23DocChecker(doctest.OutputChecker):\n \n def check_output(self, want, got, optionflags):\n- if not six.PY2:\n- want = re.sub("u\'(.*?)\'", "\'\\\\1\'", want)\n+ if six.PY2:\n+ got = re.sub("u\'(.*?)\'", "\'\\\\1\'", got)\n return doctest.OutputChecker.check_output(self, want, got, optionflags)\n \n \ndiff --git a/plone/contentrules/zcml.rst b/plone/contentrules/zcml.rst\nindex 2f47597..76d023f 100644\n--- a/plone/contentrules/zcml.rst\n+++ b/plone/contentrules/zcml.rst\n@@ -71,17 +71,17 @@ inspect conditions and actions in rules.\n \n >>> condition = getUtility(IRuleCondition, name=u"test.condition")\n >>> condition.title\n- u\'Test condition\'\n+ \'Test condition\'\n >>> condition.description\n- u\'A test condition\'\n+ \'A test condition\'\n >>> condition.for_ == None\n True\n >>> condition.event == IObjectEvent\n True\n >>> condition.addview\n- u\'test.condition\'\n+ \'test.condition\'\n >>> condition.editview\n- u\'edit\'\n+ \'edit\'\n >>> condition.schema == elements.ITestCondition\n True\n >>> condition.factory == elements.TestCondition\n@@ -89,17 +89,17 @@ inspect conditions and actions in rules.\n \n >>> action = getUtility(IRuleAction, name=u"test.action")\n >>> action.title\n- u\'Test action\'\n+ \'Test action\'\n >>> action.description\n- u\'A test action\'\n+ \'A test action\'\n >>> action.for_ == None\n True\n >>> action.event == IObjectEvent\n True\n >>> action.addview\n- u\'test.action\'\n+ \'test.action\'\n >>> action.editview\n- u\'edit\'\n+ \'edit\'\n >>> action.schema == elements.ITestAction\n True\n >>> action.factory == elements.TestAction\n' | ||
b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 148a49c..c854060 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -14,7 +14,8 @@ New features:\n \n Bug fixes:\n \n-- *add item here*\n+- Fix deprecation warning\n+ (https://github.com/plone/Products.CMFPlone/issues/2605) [ale-rt]\n \n \n 3.0.6 (2018-09-27)\ndiff --git a/plone/app/z3cform/wysiwyg/widget.py b/plone/app/z3cform/wysiwyg/widget.py\nindex 1f9e134..bbba908 100644\n--- a/plone/app/z3cform/wysiwyg/widget.py\n+++ b/plone/app/z3cform/wysiwyg/widget.py\n@@ -6,6 +6,7 @@\n \n import Acquisition\n import logging\n+import warnings\n import z3c.form.browser.textarea\n import z3c.form.interfaces\n import z3c.form.widget\n@@ -43,7 +44,7 @@ def update(self):\n @implementer(z3c.form.interfaces.IFieldWidget)\n def WysiwygFieldWidget(field, request):\n """IFieldWidget factory for WysiwygWidget."""\n- logger.warn(\n+ warnings.warn(\n \'plone.app.z3cform.wysiwyg.WysiwygFieldWidget is deprecated and\'\n \'will be removed in Plone 5.1\',\n DeprecationWarning,\n' | ||
|