diff --git a/docs/portal.md b/docs/portal.md index ae2d6003..1288277e 100644 --- a/docs/portal.md +++ b/docs/portal.md @@ -45,7 +45,7 @@ Assuming there is a document `english_page` in a folder `en`, which is the navig % invisible-code-block: python % % from plone import api -% from plone.app.layout.navigation.interfaces import INavigationRoot +% from plone.base.interfaces import INavigationRoot % from zope.interface import alsoProvides % % portal = api.portal.get() diff --git a/news/4090.bugfix b/news/4090.bugfix new file mode 100644 index 00000000..8528aefb --- /dev/null +++ b/news/4090.bugfix @@ -0,0 +1 @@ +Fix DeprecationWarnings. [maurits] diff --git a/setup.py b/setup.py index 51612921..5c161a85 100644 --- a/setup.py +++ b/setup.py @@ -36,8 +36,8 @@ "plone.app.uuid", "plone.app.dexterity", "plone.app.intid", - "plone.app.layout", "plone.app.linkintegrity", + "plone.base", "plone.dexterity", "plone.i18n", "plone.registry", diff --git a/src/plone/api/portal.py b/src/plone/api/portal.py index 6080093f..cdbe8bd5 100644 --- a/src/plone/api/portal.py +++ b/src/plone/api/portal.py @@ -7,7 +7,7 @@ from plone.api.exc import CannotGetPortalError from plone.api.exc import InvalidParameterError from plone.api.validation import required_parameters -from plone.app.layout.navigation.root import getNavigationRootObject +from plone.base.navigationroot import get_navigation_root_object from plone.registry.interfaces import IRegistry from Products.CMFCore.interfaces import ISiteRoot from Products.CMFCore.utils import getToolByName @@ -86,7 +86,7 @@ def get_navigation_root(context=None): :Example: :ref:`portal-get-navigation-root-example` """ context = aq_inner(context) - return getNavigationRootObject(context, get()) + return get_navigation_root_object(context, get()) @required_parameters("name") diff --git a/src/plone/api/relation.py b/src/plone/api/relation.py index 1b0bda97..a01f8b9f 100644 --- a/src/plone/api/relation.py +++ b/src/plone/api/relation.py @@ -10,8 +10,8 @@ from plone.api.validation import required_parameters from plone.app.linkintegrity.handlers import modifiedContent from plone.app.linkintegrity.utils import referencedRelationship +from plone.base.utils import base_hasattr from plone.dexterity.utils import iterSchemataForType -from Products.CMFPlone.utils import base_hasattr from z3c.relationfield import event from z3c.relationfield import RelationValue from z3c.relationfield.schema import Relation diff --git a/src/plone/api/testing.zcml b/src/plone/api/testing.zcml index 1a9fbf15..d0f05fa2 100644 --- a/src/plone/api/testing.zcml +++ b/src/plone/api/testing.zcml @@ -14,7 +14,7 @@ title="plone.api: Test fixture" description="Extension profile to configure a test fixture" provides="Products.GenericSetup.interfaces.EXTENSION" - for="Products.CMFPlone.interfaces.ITestCasePloneSiteRoot" + for="plone.base.interfaces.ITestCasePloneSiteRoot" directory="profiles/testfixture" /> diff --git a/src/plone/api/tests/test_content.py b/src/plone/api/tests/test_content.py index 4e9b701b..44109d95 100644 --- a/src/plone/api/tests/test_content.py +++ b/src/plone/api/tests/test_content.py @@ -8,9 +8,9 @@ from plone.api.content import _parse_object_provides_query from plone.api.tests.base import INTEGRATION_TESTING from plone.app.contenttypes.interfaces import IFolder -from plone.app.layout.navigation.interfaces import INavigationRoot from plone.app.linkintegrity.exceptions import LinkIntegrityNotificationException from plone.app.textfield import RichTextValue +from plone.base.interfaces import INavigationRoot from plone.indexer import indexer from plone.uuid.interfaces import IMutableUUID from plone.uuid.interfaces import IUUIDGenerator @@ -192,7 +192,7 @@ def test_create_constraints(self): folder.setConstrainTypesMode(ENABLED) folder.setLocallyAllowedTypes(("News Item",)) else: # DX - from Products.CMFPlone.interfaces import ISelectableConstrainTypes + from plone.base.interfaces import ISelectableConstrainTypes constraints = ISelectableConstrainTypes(folder) constraints.setConstrainTypesMode(ENABLED) diff --git a/src/plone/api/tests/test_portal.py b/src/plone/api/tests/test_portal.py index 32bfa810..844bc4e7 100644 --- a/src/plone/api/tests/test_portal.py +++ b/src/plone/api/tests/test_portal.py @@ -7,7 +7,7 @@ from plone.api import env from plone.api import portal from plone.api.tests.base import INTEGRATION_TESTING -from plone.app.layout.navigation.interfaces import INavigationRoot +from plone.base.interfaces import INavigationRoot from plone.registry import field from plone.registry.interfaces import IRegistry from plone.registry.record import Record