Skip to content

Commit

Permalink
Merge branch 'master' into deprecate_portal_propertiies
Browse files Browse the repository at this point in the history
  • Loading branch information
ale-rt authored Sep 16, 2022
2 parents bfcf3fa + 811621d commit b7782d2
Show file tree
Hide file tree
Showing 224 changed files with 747 additions and 613 deletions.
1 change: 0 additions & 1 deletion Products/CMFPlone/CatalogTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import urllib



logger = logging.getLogger('Plone')

_marker = object()
Expand Down
7 changes: 4 additions & 3 deletions Products/CMFPlone/MigrationTool.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
from AccessControl import ClassSecurityInfo
from AccessControl.requestmethod import postonly
from AccessControl.class_init import InitializeClass
from AccessControl.requestmethod import postonly
from App.config import getConfiguration
from io import StringIO
from OFS.SimpleItem import SimpleItem
from plone.base.interfaces import IMigrationTool
from Products.CMFCore.permissions import ManagePortal
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.utils import registerToolInterface
from Products.CMFCore.utils import UniqueObject
from Products.CMFPlone.factory import _DEFAULT_PROFILE
from plone.base.interfaces import IMigrationTool
from Products.CMFPlone.PloneBaseTool import PloneBaseTool
from io import StringIO
from ZODB.POSException import ConflictError
from zope.interface import implementer

Expand All @@ -19,6 +19,7 @@
import sys
import transaction


logger = logging.getLogger('plone.app.upgrade')
_upgradePaths = {}

Expand Down
5 changes: 3 additions & 2 deletions Products/CMFPlone/PasswordResetTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@
from AccessControl.class_init import InitializeClass
from BTrees.OOBTree import OOBTree
from OFS.SimpleItem import SimpleItem
from plone.base.interfaces import IPWResetTool
from plone.base.interfaces import ISecuritySchema
from plone.registry.interfaces import IRegistry
from plone.uuid.interfaces import IUUIDGenerator
from Products.CMFCore.permissions import ManagePortal
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.utils import UniqueObject
from plone.base.interfaces import IPWResetTool
from plone.base.interfaces import ISecuritySchema
from Products.CMFPlone.RegistrationTool import get_member_by_login_name
from zope.component import getUtility
from zope.interface import implementer

import datetime


Expand Down
1 change: 1 addition & 0 deletions Products/CMFPlone/PloneBatch.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from zope.deprecation import moved


moved('plone.base.batch', 'Version 7.0')
8 changes: 5 additions & 3 deletions Products/CMFPlone/PloneControlPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@
from App.special_dtml import DTMLFile
from OFS.Folder import Folder
from OFS.PropertyManager import PropertyManager
from plone.base.interfaces import IControlPanel
from Products.CMFCore.ActionInformation import ActionInformation
from Products.CMFCore.ActionProviderBase import ActionProviderBase
from Products.CMFCore.Expression import Expression, createExprContext
from Products.CMFCore.permissions import ManagePortal, View
from Products.CMFCore.Expression import createExprContext
from Products.CMFCore.Expression import Expression
from Products.CMFCore.permissions import ManagePortal
from Products.CMFCore.permissions import View
from Products.CMFCore.utils import _checkPermission
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.utils import registerToolInterface
from Products.CMFCore.utils import UniqueObject
from Products.CMFPlone import PloneMessageFactory as _
from plone.base.interfaces import IControlPanel
from Products.CMFPlone.PloneBaseTool import PloneBaseTool
from zope.component.hooks import getSite
from zope.i18n import translate
Expand Down
23 changes: 11 additions & 12 deletions Products/CMFPlone/PropertiesTool.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
from Acquisition import aq_parent, aq_inner
from Products.CMFCore.permissions import ManagePortal
from Products.CMFCore.utils import UniqueObject

from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from OFS.Folder import Folder
from AccessControl import ClassSecurityInfo
from AccessControl.class_init import InitializeClass
from Acquisition import aq_inner
from Acquisition import aq_parent
from App.special_dtml import DTMLFile
from zope.interface import implementer

from OFS.Folder import Folder
from OFS.PropertyManager import PropertyManager
from OFS.SimpleItem import SimpleItem
from AccessControl import ClassSecurityInfo
from plone.base.interfaces import IPropertiesTool
from plone.base.interfaces import ISimpleItemWithProperties
from Products.CMFCore.interfaces import ISiteRoot
from Products.CMFCore.permissions import ManagePortal
from Products.CMFCore.utils import UniqueObject
from Products.CMFPlone.PloneBaseTool import PloneBaseTool
from plone.base.interfaces \
import IPropertiesTool, ISimpleItemWithProperties
from Products.CMFPlone.utils import WWW_DIR
from Products.MailHost.interfaces import IMailHost
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from zope.component import getUtility
from zope.component import queryUtility
from Products.CMFCore.interfaces import ISiteRoot
from zope.deprecation import deprecate
from zope.interface import implementer


@implementer(IPropertiesTool)
Expand Down
2 changes: 0 additions & 2 deletions Products/CMFPlone/TypesTool.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from AccessControl import ClassSecurityInfo
from AccessControl.class_init import InitializeClass

from Products.CMFCore.ActionInformation import ActionInfo
from Products.CMFCore.interfaces import IAction
from Products.CMFCore.TypesTool import TypesTool as BaseTool

from Products.CMFPlone.PloneBaseTool import PloneBaseTool


Expand Down
4 changes: 2 additions & 2 deletions Products/CMFPlone/URLTool.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from AccessControl import ClassSecurityInfo
from AccessControl.class_init import InitializeClass
from Acquisition import aq_inner
from Acquisition import aq_parent
from AccessControl.class_init import InitializeClass
from Products.CMFCore.interfaces import ISiteRoot
from Products.CMFCore.URLTool import URLTool as BaseTool
from Products.CMFPlone.PloneBaseTool import PloneBaseTool
from Products.CMFPlone.patches.gtbn import rewrap_in_request_container
from Products.CMFPlone.PloneBaseTool import PloneBaseTool
from zope.component import getUtility


Expand Down
20 changes: 10 additions & 10 deletions Products/CMFPlone/WorkflowTool.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
from zope.component import getMultiAdapter

from Products.CMFCore.utils import getToolByName
from Products.CMFCore.WorkflowTool import WorkflowTool as BaseTool
from plone.base.interfaces import IWorkflowChain
from ZODB.POSException import ConflictError
from Acquisition import aq_base

from AccessControl import ClassSecurityInfo
from AccessControl import getSecurityManager
from AccessControl.class_init import InitializeClass
from AccessControl import getSecurityManager, ClassSecurityInfo
from Acquisition import aq_base
from plone.base.interfaces import IWorkflowChain
from Products.CMFCore.permissions import ManagePortal
from Products.DCWorkflow.Transitions import TRIGGER_USER_ACTION
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.WorkflowTool import WorkflowTool as BaseTool
from Products.CMFPlone.PloneBaseTool import PloneBaseTool
from Products.DCWorkflow.Transitions import TRIGGER_USER_ACTION
from ZODB.POSException import ConflictError
from zope.component import getMultiAdapter

import pkg_resources


try:
pkg_resources.get_distribution('plone.app.multilingual')
except pkg_resources.DistributionNotFound:
Expand Down
1 change: 1 addition & 0 deletions Products/CMFPlone/bbb.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pkg_resources


HAS_ZSERVER = True
try:
dist = pkg_resources.get_distribution('ZServer')
Expand Down
6 changes: 4 additions & 2 deletions Products/CMFPlone/browser/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
from Products.CMFPlone.factory import _DEFAULT_PROFILE
from Products.CMFPlone.factory import addPloneSite
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from Products.GenericSetup import BASE, EXTENSION
from Products.GenericSetup import BASE
from Products.GenericSetup import EXTENSION
from Products.GenericSetup import profile_registry
from Products.GenericSetup.upgrade import normalize_version
from urllib import parse
Expand All @@ -24,7 +25,8 @@
from zope.component import queryMultiAdapter
from zope.component import queryUtility
from zope.i18n.interfaces import IUserPreferredLanguages
from zope.i18n.locales import locales, LoadLocaleError
from zope.i18n.locales import LoadLocaleError
from zope.i18n.locales import locales
from zope.interface import alsoProvides
from zope.interface import Interface
from zope.publisher.browser import BrowserView
Expand Down
6 changes: 3 additions & 3 deletions Products/CMFPlone/browser/atd.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from Products.CMFCore.utils import getToolByName
from zope.component import getUtility
from plone.registry.interfaces import IRegistry
from http import client as http_client
from plone.base.interfaces import ITinyMCESchema
from plone.base.interfaces.atd import IATDProxyView
from plone.registry.interfaces import IRegistry
from Products.CMFCore.utils import getToolByName
from zope.component import getUtility
from zope.interface import implementer


Expand Down
12 changes: 7 additions & 5 deletions Products/CMFPlone/browser/contact_info.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
from email.mime.text import MIMEText
from plone.autoform.form import AutoExtensibleForm
from plone.base.interfaces.controlpanel import IMailSchema
from plone.registry.interfaces import IRegistry
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone import PloneMessageFactory as _
from Products.CMFPlone.browser.interfaces import IContactForm
from plone.base.interfaces.controlpanel import IMailSchema
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from Products.statusmessages.interfaces import IStatusMessage
from email.mime.text import MIMEText
from plone.autoform.form import AutoExtensibleForm
from plone.registry.interfaces import IRegistry
from smtplib import SMTPException
from z3c.form import form, button
from z3c.form import button
from z3c.form import form
from zope.component import getUtility
from zope.component.hooks import getSite

import logging


log = logging.getLogger(__name__)


Expand Down
2 changes: 1 addition & 1 deletion Products/CMFPlone/browser/defaultpage.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from Acquisition import aq_inner
from plone.base.interfaces.defaultpage import IDefaultPage
from plone.base.defaultpage import get_default_page
from plone.base.defaultpage import is_default_page
from plone.base.interfaces.defaultpage import IDefaultPage
from Products.Five.browser import BrowserView
from zope.interface import implementer

Expand Down
2 changes: 1 addition & 1 deletion Products/CMFPlone/browser/favicon.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from Products.CMFPlone.interfaces import ISiteSchema
from plone.formwidget.namedfile.converter import b64decode_file
from plone.memoize import ram
from plone.namedfile.browser import DisplayFile
from plone.namedfile.file import NamedImage
from plone.registry.interfaces import IRegistry
from Products.CMFPlone.interfaces import ISiteSchema
from zope.component import getUtility

import os.path
Expand Down
6 changes: 2 additions & 4 deletions Products/CMFPlone/browser/global_statusmessage.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from zope.interface import implementer

from Products.CMFPlone.browser.interfaces import IGlobalStatusMessage
from Products.Five import BrowserView
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile

from Products.CMFPlone.browser.interfaces import IGlobalStatusMessage
from zope.interface import implementer


@implementer(IGlobalStatusMessage)
Expand Down
6 changes: 3 additions & 3 deletions Products/CMFPlone/browser/icons.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
from lxml import etree
from OFS.Image import File
from plone.registry.interfaces import IRegistry
from Products.Five.browser import BrowserView
from Products.CMFCore.interfaces import ISiteRoot
from Products.Five.browser import BrowserView
from zExceptions import NotFound
from zope.component import adapter
from zope.component import getUtility
from zope.component.hooks import getSite
from zope.interface import implementer
from zope.interface import Interface
from zope.location.interfaces import LocationError
from zope.traversing.interfaces import ITraversable
from zope.publisher.interfaces import IPublishTraverse
from zExceptions import NotFound
from zope.traversing.interfaces import ITraversable

import logging


logger = logging.getLogger(__name__)


Expand Down
6 changes: 2 additions & 4 deletions Products/CMFPlone/browser/interfaces.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
from plone.schema import Email
from Products.CMFPlone import PloneMessageFactory as _
from zope import schema
from zope.interface import Attribute
from zope.interface import Interface

from plone.schema import Email

import zope.deferredimport

from Products.CMFPlone import PloneMessageFactory as _


# This is used as a persistent marker interface, we need to provide an upgrade
# step to update the class reference before removing it.
Expand Down
6 changes: 3 additions & 3 deletions Products/CMFPlone/browser/login/login.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from DateTime import DateTime
from plone.app.users.browser.passwordpanel import PasswordPanel
from plone.registry.interfaces import IRegistry
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone import PloneMessageFactory as _
from plone.base.interfaces import IForcePasswordChange
from plone.base.interfaces import IInitialLogin
from plone.base.interfaces import ILoginForm
from plone.base.interfaces import ILoginFormSchema
from plone.base.interfaces import IRedirectAfterLogin
from plone.base.interfaces import ISecuritySchema
from plone.registry.interfaces import IRegistry
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone import PloneMessageFactory as _
from Products.Five.browser import BrowserView
from Products.statusmessages.interfaces import IStatusMessage
from urllib import parse
Expand Down
6 changes: 3 additions & 3 deletions Products/CMFPlone/browser/login/login_help.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from email import message_from_string
from email.header import Header
from plone.registry.interfaces import IRegistry
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone import PloneMessageFactory as _
from plone.base.interfaces import ILoginHelpForm
from plone.base.interfaces import ILoginHelpFormSchema
from plone.base.interfaces import ISecuritySchema
from plone.base.interfaces.controlpanel import IMailSchema
from plone.base.utils import safe_text
from plone.registry.interfaces import IRegistry
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone import PloneMessageFactory as _
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from Products.statusmessages.interfaces import IStatusMessage
from smtplib import SMTPException
Expand Down
3 changes: 1 addition & 2 deletions Products/CMFPlone/browser/login/password_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from Products.PlonePAS.events import UserInitialLoginInEvent
from Products.PlonePAS.events import UserLoggedInEvent
from Products.PluggableAuthService.interfaces.plugins import \
ICredentialsUpdatePlugin
from Products.PluggableAuthService.interfaces.plugins import ICredentialsUpdatePlugin
from Products.statusmessages.interfaces import IStatusMessage
from zope.component import getMultiAdapter
from zope.component import getUtility
Expand Down
6 changes: 4 additions & 2 deletions Products/CMFPlone/browser/navtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@
from plone.app.layout.navigation.interfaces import INavtreeStrategy
from plone.app.layout.navigation.navtree import NavtreeStrategyBase
from plone.app.layout.navigation.root import getNavigationRoot
from plone.base.interfaces import INavigationSchema
from plone.i18n.normalizer.interfaces import IIDNormalizer
from plone.registry.interfaces import IRegistry
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone import utils
from plone.base.interfaces import INavigationSchema
from zope.component import getMultiAdapter, queryUtility
from zope.component import getMultiAdapter
from zope.component import getUtility
from zope.component import queryUtility
from zope.interface import implementer


# Strategy objects for the navtree creation code. You can subclass these
# to expand the default navtree behaviour, and pass instances of your
# subclasses to buildFolderTree().
Expand Down
4 changes: 2 additions & 2 deletions Products/CMFPlone/browser/robots.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from plone.base.interfaces.controlpanel import ISiteSchema
from Products.Five.browser import BrowserView
from plone.registry.interfaces import IRegistry
from zope.component import getUtility
from Products.Five.browser import BrowserView
from zope.component import getMultiAdapter
from zope.component import getUtility


class Robots(BrowserView):
Expand Down
1 change: 1 addition & 0 deletions Products/CMFPlone/browser/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import json
import re


_ = MessageFactory('plone')

# We should accept both a simple space, unicode u'\u0020 but also a
Expand Down
Loading

0 comments on commit b7782d2

Please sign in to comment.