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 some deprecation warnings #3485

Merged
merged 5 commits into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
20 changes: 10 additions & 10 deletions Products/CMFPlone/Portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
from ComputedAttribute import ComputedAttribute
from five.localsitemanager.registry import PersistentComponents
from OFS.ObjectManager import REPLACEABLE
from plone.base import PloneMessageFactory as _
from plone.base.interfaces.siteroot import IPloneSiteRoot
from plone.base.interfaces.syndication import ISyndicatable
from plone.base.permissions import AddPortalContent
from plone.base.permissions import AddPortalFolders
from plone.base.permissions import ListPortalMembers
from plone.base.permissions import ModifyPortalContent
from plone.base.permissions import ReplyToItem
from plone.base.permissions import View
from plone.dexterity.content import Container
from Products.CMFCore import permissions
from Products.CMFCore.interfaces import IContentish
Expand All @@ -23,21 +32,12 @@
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.utils import UniqueObject
from Products.CMFPlone import bbb
from Products.CMFPlone import PloneMessageFactory as _
from plone.base.interfaces.siteroot import IPloneSiteRoot
from plone.base.interfaces.syndication import ISyndicatable
from Products.CMFPlone.permissions import AddPortalContent
from Products.CMFPlone.permissions import AddPortalFolders
from Products.CMFPlone.permissions import ListPortalMembers
from Products.CMFPlone.permissions import ModifyPortalContent
from Products.CMFPlone.permissions import ReplyToItem
from Products.CMFPlone.permissions import View
from Products.Five.component.interfaces import IObjectManagerSite
from zope.interface.interfaces import ComponentLookupError
from zope.event import notify
from zope.interface import classImplementsOnly
from zope.interface import implementedBy
from zope.interface import implementer
from zope.interface.interfaces import ComponentLookupError
from zope.traversing.interfaces import BeforeTraverseEvent


Expand Down
6 changes: 3 additions & 3 deletions Products/CMFPlone/RegistrationTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
from Acquisition import aq_chain
from email import message_from_string
from hashlib import md5
from plone.base import PloneMessageFactory as _
from plone.base.interfaces import ISecuritySchema
from plone.base.permissions import ManagePortal
from plone.registry.interfaces import IRegistry
from Products.CMFCore.interfaces import ISiteRoot
from Products.CMFCore.permissions import AddPortalMember
from Products.CMFCore.RegistrationTool import RegistrationTool as BaseTool
from Products.CMFCore.utils import _checkPermission
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone import PloneMessageFactory as _
from plone.base.interfaces import ISecuritySchema
from Products.CMFPlone.PloneBaseTool import PloneBaseTool
from Products.CMFPlone.PloneTool import EMAIL_RE
from Products.PluggableAuthService.interfaces.authservice import IPluggableAuthService # noqa: E501
from Products.PluggableAuthService.interfaces.authservice import IPluggableAuthService
from Products.PluggableAuthService.interfaces.plugins import IValidationPlugin
from Products.PluggableAuthService.permissions import SetOwnPassword
from smtplib import SMTPException
Expand Down
8 changes: 3 additions & 5 deletions Products/CMFPlone/events.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
from plone.base.interfaces import IReorderedEvent
from plone.base.interfaces import ISiteManagerCreatedEvent
from plone.base.utils import get_installer
from zope.interface import implementer
from zope.interface.interfaces import ObjectEvent
from Products.CMFPlone.utils import get_installer

from .interfaces import ISiteManagerCreatedEvent
from .interfaces import IReorderedEvent


@implementer(ISiteManagerCreatedEvent)
class SiteManagerCreatedEvent(ObjectEvent):

pass


Expand Down
2 changes: 1 addition & 1 deletion Products/CMFPlone/resources/utils.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
from plone.base.interfaces.resources import OVERRIDE_RESOURCE_DIRECTORY_NAME
from plone.resource.file import FilesystemFile
from plone.resource.interfaces import IResourceDirectory
from Products.CMFCore.Expression import createExprContext
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone.interfaces.resources import OVERRIDE_RESOURCE_DIRECTORY_NAME
from zExceptions import NotFound
from zope.component import queryUtility

Expand Down