Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DeprecationWarnings. #296

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/4090.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix DeprecationWarnings. [maurits]
4 changes: 2 additions & 2 deletions plone/app/content/browser/reviewlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ def items(self):
)
)
is_structural_folder = obj.restrictedTraverse(
"@@plone"
).isStructuralFolder()
"@@plone_context_state"
).is_structural_folder()

if obj.portal_type in use_view_action:
view_url = url + "/view"
Expand Down
20 changes: 10 additions & 10 deletions plone/app/content/tests/test_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def setUp(self):
type1_fti.filter_content_types = True
type1_fti.allowed_content_types = ["type1"]
type1_fti.behaviors = (
"Products.CMFPlone.interfaces.constrains.ISelectableConstrainTypes", # noqa
"plone.app.dexterity.behaviors.metadata.IBasic",
"plone.constraintypes",
"plone.basic",
)
self.portal.portal_types._setObject("type1", type1_fti)
self.type1_fti = type1_fti
Expand Down Expand Up @@ -78,8 +78,8 @@ def setUp(self):
type1_fti.filter_content_types = True
type1_fti.allowed_content_types = ["type1"]
type1_fti.behaviors = (
"Products.CMFPlone.interfaces.constrains.ISelectableConstrainTypes", # noqa
"plone.app.dexterity.behaviors.metadata.IBasic",
"plone.constraintypes",
"plone.basic",
)
self.portal.portal_types._setObject("type1", type1_fti)
self.type1_fti = type1_fti
Expand Down Expand Up @@ -161,8 +161,8 @@ def setUp(self):
type1_fti.filter_content_types = True
type1_fti.allowed_content_types = ["type1"]
type1_fti.behaviors = (
"Products.CMFPlone.interfaces.constrains.ISelectableConstrainTypes", # noqa
"plone.app.dexterity.behaviors.metadata.IBasic",
"plone.constraintypes",
"plone.basic",
)
self.portal.portal_types._setObject("type1", type1_fti)
self.type1_fti = type1_fti
Expand Down Expand Up @@ -262,8 +262,8 @@ def setUp(self):
type1_fti.filter_content_types = True
type1_fti.allowed_content_types = ["type1"]
type1_fti.behaviors = (
"Products.CMFPlone.interfaces.constrains.ISelectableConstrainTypes", # noqa
"plone.app.dexterity.behaviors.metadata.IBasic",
"plone.constraintypes",
"plone.basic",
)
self.portal.portal_types._setObject("type1", type1_fti)
self.type1_fti = type1_fti
Expand Down Expand Up @@ -346,7 +346,7 @@ def setUp(self):
type1_fti.klass = "plone.dexterity.content.Container"
type1_fti.filter_content_types = True
type1_fti.allowed_content_types = []
type1_fti.behaviors = ("plone.app.dexterity.behaviors.metadata.IBasic",)
type1_fti.behaviors = ("plone.basic",)
self.portal.portal_types._setObject("type1", type1_fti)
self.type1_fti = type1_fti

Expand All @@ -355,7 +355,7 @@ def setUp(self):
type2_fti.klass = "plone.dexterity.content.Item"
type2_fti.filter_content_types = True
type2_fti.allowed_content_types = []
type2_fti.behaviors = ("plone.app.dexterity.behaviors.metadata.IBasic",)
type2_fti.behaviors = ("plone.basic",)
self.portal.portal_types._setObject("type2", type2_fti)
self.type2_fti = type2_fti

Expand Down
2 changes: 1 addition & 1 deletion plone/app/content/tests/test_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def add_mock_fti(portal):


def _custom_field_widget(field, request):
from plone.app.z3cform.widget import AjaxSelectWidget
from plone.app.z3cform.widgets.select import AjaxSelectWidget

widget = FieldWidget(field, AjaxSelectWidget(request))
widget.vocabulary = "plone.app.vocabularies.PortalTypes"
Expand Down
Loading