Skip to content

Commit

Permalink
[fc] Repository: plone.app.content
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2025-01-20T18:10:59+01:00
Author: Maurits van Rees (mauritsvanrees) <[email protected]>
Commit: plone/plone.app.content@1d569e5

Fix DeprecationWarnings.

Files changed:
A news/4090.bugfix
M plone/app/content/browser/reviewlist.py
M plone/app/content/tests/test_contents.py
M plone/app/content/tests/test_permissions.py
Repository: plone.app.content

Branch: refs/heads/master
Date: 2025-01-21T15:53:01+01:00
Author: Gil Forcada Codinachs (gforcada) <[email protected]>
Commit: plone/plone.app.content@8ac28ff

Merge pull request #296 from plone/maurits-warnings

Fix DeprecationWarnings.

Files changed:
A news/4090.bugfix
M plone/app/content/browser/reviewlist.py
M plone/app/content/tests/test_contents.py
M plone/app/content/tests/test_permissions.py
  • Loading branch information
gforcada committed Jan 21, 2025
1 parent 7ea44c9 commit 6527c71
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
Repository: plone.app.contentrules
Repository: plone.app.content


Branch: refs/heads/master
Date: 2025-01-18T23:37:48+01:00
Date: 2025-01-20T18:10:59+01:00
Author: Maurits van Rees (mauritsvanrees) <[email protected]>
Commit: https://github.com/plone/plone.app.contentrules/commit/9b8a3cf2511a1d9d5289c0a263f5fb24d907d219
Commit: https://github.com/plone/plone.app.content/commit/1d569e5706ea39fb1dfade21d3b682e3e0e222be

Fix DeprecationWarnings.

Files changed:
A news/1.bugfix
M plone/app/contentrules/handlers.py
A news/4090.bugfix
M plone/app/content/browser/reviewlist.py
M plone/app/content/tests/test_contents.py
M plone/app/content/tests/test_permissions.py

b'diff --git a/news/1.bugfix b/news/1.bugfix\nnew file mode 100644\nindex 0000000..8528aef\n--- /dev/null\n+++ b/news/1.bugfix\n@@ -0,0 +1 @@\n+Fix DeprecationWarnings. [maurits]\ndiff --git a/plone/app/contentrules/handlers.py b/plone/app/contentrules/handlers.py\nindex c873fdf..837d5bf 100644\n--- a/plone/app/contentrules/handlers.py\n+++ b/plone/app/contentrules/handlers.py\n@@ -9,10 +9,10 @@\n from zope.component import queryUtility\n from zope.component.hooks import getSite\n from zope.container.interfaces import IContainerModifiedEvent\n-from zope.container.interfaces import IObjectAddedEvent\n-from zope.container.interfaces import IObjectRemovedEvent\n from zope.interface import Interface\n+from zope.lifecycleevent.interfaces import IObjectAddedEvent\n from zope.lifecycleevent.interfaces import IObjectCopiedEvent\n+from zope.lifecycleevent.interfaces import IObjectRemovedEvent\n \n import threading\n \n'
b'diff --git a/news/4090.bugfix b/news/4090.bugfix\nnew file mode 100644\nindex 00000000..8528aefb\n--- /dev/null\n+++ b/news/4090.bugfix\n@@ -0,0 +1 @@\n+Fix DeprecationWarnings. [maurits]\ndiff --git a/plone/app/content/browser/reviewlist.py b/plone/app/content/browser/reviewlist.py\nindex 52bbc23f..0456b993 100644\n--- a/plone/app/content/browser/reviewlist.py\n+++ b/plone/app/content/browser/reviewlist.py\n@@ -107,8 +107,8 @@ def items(self):\n )\n )\n is_structural_folder = obj.restrictedTraverse(\n- "@@plone"\n- ).isStructuralFolder()\n+ "@@plone_context_state"\n+ ).is_structural_folder()\n \n if obj.portal_type in use_view_action:\n view_url = url + "/view"\ndiff --git a/plone/app/content/tests/test_contents.py b/plone/app/content/tests/test_contents.py\nindex 80ba2ecd..70b9ea74 100644\n--- a/plone/app/content/tests/test_contents.py\n+++ b/plone/app/content/tests/test_contents.py\n@@ -35,8 +35,8 @@ def setUp(self):\n type1_fti.filter_content_types = True\n type1_fti.allowed_content_types = ["type1"]\n type1_fti.behaviors = (\n- "Products.CMFPlone.interfaces.constrains.ISelectableConstrainTypes", # noqa\n- "plone.app.dexterity.behaviors.metadata.IBasic",\n+ "plone.constraintypes",\n+ "plone.basic",\n )\n self.portal.portal_types._setObject("type1", type1_fti)\n self.type1_fti = type1_fti\n@@ -78,8 +78,8 @@ def setUp(self):\n type1_fti.filter_content_types = True\n type1_fti.allowed_content_types = ["type1"]\n type1_fti.behaviors = (\n- "Products.CMFPlone.interfaces.constrains.ISelectableConstrainTypes", # noqa\n- "plone.app.dexterity.behaviors.metadata.IBasic",\n+ "plone.constraintypes",\n+ "plone.basic",\n )\n self.portal.portal_types._setObject("type1", type1_fti)\n self.type1_fti = type1_fti\n@@ -161,8 +161,8 @@ def setUp(self):\n type1_fti.filter_content_types = True\n type1_fti.allowed_content_types = ["type1"]\n type1_fti.behaviors = (\n- "Products.CMFPlone.interfaces.constrains.ISelectableConstrainTypes", # noqa\n- "plone.app.dexterity.behaviors.metadata.IBasic",\n+ "plone.constraintypes",\n+ "plone.basic",\n )\n self.portal.portal_types._setObject("type1", type1_fti)\n self.type1_fti = type1_fti\n@@ -262,8 +262,8 @@ def setUp(self):\n type1_fti.filter_content_types = True\n type1_fti.allowed_content_types = ["type1"]\n type1_fti.behaviors = (\n- "Products.CMFPlone.interfaces.constrains.ISelectableConstrainTypes", # noqa\n- "plone.app.dexterity.behaviors.metadata.IBasic",\n+ "plone.constraintypes",\n+ "plone.basic",\n )\n self.portal.portal_types._setObject("type1", type1_fti)\n self.type1_fti = type1_fti\n@@ -346,7 +346,7 @@ def setUp(self):\n type1_fti.klass = "plone.dexterity.content.Container"\n type1_fti.filter_content_types = True\n type1_fti.allowed_content_types = []\n- type1_fti.behaviors = ("plone.app.dexterity.behaviors.metadata.IBasic",)\n+ type1_fti.behaviors = ("plone.basic",)\n self.portal.portal_types._setObject("type1", type1_fti)\n self.type1_fti = type1_fti\n \n@@ -355,7 +355,7 @@ def setUp(self):\n type2_fti.klass = "plone.dexterity.content.Item"\n type2_fti.filter_content_types = True\n type2_fti.allowed_content_types = []\n- type2_fti.behaviors = ("plone.app.dexterity.behaviors.metadata.IBasic",)\n+ type2_fti.behaviors = ("plone.basic",)\n self.portal.portal_types._setObject("type2", type2_fti)\n self.type2_fti = type2_fti\n \ndiff --git a/plone/app/content/tests/test_permissions.py b/plone/app/content/tests/test_permissions.py\nindex af75193f..05a74d5a 100644\n--- a/plone/app/content/tests/test_permissions.py\n+++ b/plone/app/content/tests/test_permissions.py\n@@ -35,7 +35,7 @@ def add_mock_fti(portal):\n \n \n def _custom_field_widget(field, request):\n- from plone.app.z3cform.widget import AjaxSelectWidget\n+ from plone.app.z3cform.widgets.select import AjaxSelectWidget\n \n widget = FieldWidget(field, AjaxSelectWidget(request))\n widget.vocabulary = "plone.app.vocabularies.PortalTypes"\n'

Repository: plone.app.contentrules
Repository: plone.app.content


Branch: refs/heads/master
Date: 2025-01-21T15:51:41+01:00
Date: 2025-01-21T15:53:01+01:00
Author: Gil Forcada Codinachs (gforcada) <[email protected]>
Commit: https://github.com/plone/plone.app.contentrules/commit/1adfec538248ee19811f3f52ff593dbcf53d073f
Commit: https://github.com/plone/plone.app.content/commit/8ac28ff4eb29a79531d63e23d3a45a1758cdd824

Merge pull request #106 from plone/maurits-warnings
Merge pull request #296 from plone/maurits-warnings

Fix DeprecationWarnings.

Files changed:
A news/1.bugfix
M plone/app/contentrules/handlers.py
A news/4090.bugfix
M plone/app/content/browser/reviewlist.py
M plone/app/content/tests/test_contents.py
M plone/app/content/tests/test_permissions.py

b'diff --git a/news/1.bugfix b/news/1.bugfix\nnew file mode 100644\nindex 0000000..8528aef\n--- /dev/null\n+++ b/news/1.bugfix\n@@ -0,0 +1 @@\n+Fix DeprecationWarnings. [maurits]\ndiff --git a/plone/app/contentrules/handlers.py b/plone/app/contentrules/handlers.py\nindex c873fdf..837d5bf 100644\n--- a/plone/app/contentrules/handlers.py\n+++ b/plone/app/contentrules/handlers.py\n@@ -9,10 +9,10 @@\n from zope.component import queryUtility\n from zope.component.hooks import getSite\n from zope.container.interfaces import IContainerModifiedEvent\n-from zope.container.interfaces import IObjectAddedEvent\n-from zope.container.interfaces import IObjectRemovedEvent\n from zope.interface import Interface\n+from zope.lifecycleevent.interfaces import IObjectAddedEvent\n from zope.lifecycleevent.interfaces import IObjectCopiedEvent\n+from zope.lifecycleevent.interfaces import IObjectRemovedEvent\n \n import threading\n \n'
b'diff --git a/news/4090.bugfix b/news/4090.bugfix\nnew file mode 100644\nindex 00000000..8528aefb\n--- /dev/null\n+++ b/news/4090.bugfix\n@@ -0,0 +1 @@\n+Fix DeprecationWarnings. [maurits]\ndiff --git a/plone/app/content/browser/reviewlist.py b/plone/app/content/browser/reviewlist.py\nindex 52bbc23f..0456b993 100644\n--- a/plone/app/content/browser/reviewlist.py\n+++ b/plone/app/content/browser/reviewlist.py\n@@ -107,8 +107,8 @@ def items(self):\n )\n )\n is_structural_folder = obj.restrictedTraverse(\n- "@@plone"\n- ).isStructuralFolder()\n+ "@@plone_context_state"\n+ ).is_structural_folder()\n \n if obj.portal_type in use_view_action:\n view_url = url + "/view"\ndiff --git a/plone/app/content/tests/test_contents.py b/plone/app/content/tests/test_contents.py\nindex 80ba2ecd..70b9ea74 100644\n--- a/plone/app/content/tests/test_contents.py\n+++ b/plone/app/content/tests/test_contents.py\n@@ -35,8 +35,8 @@ def setUp(self):\n type1_fti.filter_content_types = True\n type1_fti.allowed_content_types = ["type1"]\n type1_fti.behaviors = (\n- "Products.CMFPlone.interfaces.constrains.ISelectableConstrainTypes", # noqa\n- "plone.app.dexterity.behaviors.metadata.IBasic",\n+ "plone.constraintypes",\n+ "plone.basic",\n )\n self.portal.portal_types._setObject("type1", type1_fti)\n self.type1_fti = type1_fti\n@@ -78,8 +78,8 @@ def setUp(self):\n type1_fti.filter_content_types = True\n type1_fti.allowed_content_types = ["type1"]\n type1_fti.behaviors = (\n- "Products.CMFPlone.interfaces.constrains.ISelectableConstrainTypes", # noqa\n- "plone.app.dexterity.behaviors.metadata.IBasic",\n+ "plone.constraintypes",\n+ "plone.basic",\n )\n self.portal.portal_types._setObject("type1", type1_fti)\n self.type1_fti = type1_fti\n@@ -161,8 +161,8 @@ def setUp(self):\n type1_fti.filter_content_types = True\n type1_fti.allowed_content_types = ["type1"]\n type1_fti.behaviors = (\n- "Products.CMFPlone.interfaces.constrains.ISelectableConstrainTypes", # noqa\n- "plone.app.dexterity.behaviors.metadata.IBasic",\n+ "plone.constraintypes",\n+ "plone.basic",\n )\n self.portal.portal_types._setObject("type1", type1_fti)\n self.type1_fti = type1_fti\n@@ -262,8 +262,8 @@ def setUp(self):\n type1_fti.filter_content_types = True\n type1_fti.allowed_content_types = ["type1"]\n type1_fti.behaviors = (\n- "Products.CMFPlone.interfaces.constrains.ISelectableConstrainTypes", # noqa\n- "plone.app.dexterity.behaviors.metadata.IBasic",\n+ "plone.constraintypes",\n+ "plone.basic",\n )\n self.portal.portal_types._setObject("type1", type1_fti)\n self.type1_fti = type1_fti\n@@ -346,7 +346,7 @@ def setUp(self):\n type1_fti.klass = "plone.dexterity.content.Container"\n type1_fti.filter_content_types = True\n type1_fti.allowed_content_types = []\n- type1_fti.behaviors = ("plone.app.dexterity.behaviors.metadata.IBasic",)\n+ type1_fti.behaviors = ("plone.basic",)\n self.portal.portal_types._setObject("type1", type1_fti)\n self.type1_fti = type1_fti\n \n@@ -355,7 +355,7 @@ def setUp(self):\n type2_fti.klass = "plone.dexterity.content.Item"\n type2_fti.filter_content_types = True\n type2_fti.allowed_content_types = []\n- type2_fti.behaviors = ("plone.app.dexterity.behaviors.metadata.IBasic",)\n+ type2_fti.behaviors = ("plone.basic",)\n self.portal.portal_types._setObject("type2", type2_fti)\n self.type2_fti = type2_fti\n \ndiff --git a/plone/app/content/tests/test_permissions.py b/plone/app/content/tests/test_permissions.py\nindex af75193f..05a74d5a 100644\n--- a/plone/app/content/tests/test_permissions.py\n+++ b/plone/app/content/tests/test_permissions.py\n@@ -35,7 +35,7 @@ def add_mock_fti(portal):\n \n \n def _custom_field_widget(field, request):\n- from plone.app.z3cform.widget import AjaxSelectWidget\n+ from plone.app.z3cform.widgets.select import AjaxSelectWidget\n \n widget = FieldWidget(field, AjaxSelectWidget(request))\n widget.vocabulary = "plone.app.vocabularies.PortalTypes"\n'

0 comments on commit 6527c71

Please sign in to comment.