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

Deprecate the portal_properties tool #3645

Merged
merged 4 commits into from
Sep 19, 2022
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
22 changes: 22 additions & 0 deletions Products/CMFPlone/PropertiesTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from zope.component import getUtility
from zope.component import queryUtility
from zope.deprecation import deprecate
from zope.interface import implementer


Expand Down Expand Up @@ -105,6 +106,17 @@ def title(self):
def smtp_server(self):
return getUtility(IMailHost).smtp_host


@deprecate(
"The portal portal_properties tool will be removed in Plone 6.1. "
"Use the portal_registry instead. "
"Check https://github.com/plone/Products.CMFPlone/issues/125 "
"for more details."
)
def hasProperty(self, id):
return super().hasProperty(id)


InitializeClass(PropertiesTool)


Expand All @@ -124,4 +136,14 @@ def __init__(self, id, title=''):
manage_options = (PropertyManager.manage_options
+ SimpleItem.manage_options)

@deprecate(
"The portal portal_properties tool will be removed in Plone 6.1. "
"Use the portal_registry instead. "
"Check https://github.com/plone/Products.CMFPlone/issues/125 "
"for more details."
)
def hasProperty(self, id):
return super().hasProperty(id)


InitializeClass(SimpleItemWithProperties)
1 change: 1 addition & 0 deletions news/125.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deprecate the portal_properties tool