remove deprecated zope.app.container references

This commit is contained in:
Helmut Merz 2024-09-23 22:50:46 +02:00
parent 9fbd97386e
commit b22dbf879c
14 changed files with 32 additions and 130 deletions

View file

@ -1,29 +1,11 @@
# # cybertools.browser.url
# Copyright (c) 2017 Helmut Merz helmutm@cy55.de
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
""" URL manipulation utilities """ URL manipulation utilities
$Id$
""" """
from urlparse import urlparse from urlparse import urlparse
from zope.app.container.traversal import ItemTraverser from zope.container.traversal import ItemTraverser
from zope.interface import Interface, implements from zope.interface import Interface, implements

View file

@ -43,7 +43,7 @@ for testing purposes here) and a catalog with a few indexes.
In addition we need a class for the content objects that we want In addition we need a class for the content objects that we want
to index and query. to index and query.
>>> from zope.app.container.contained import Contained >>> from zope.container.contained import Contained
>>> class Content(Contained): >>> class Content(Contained):
... def __init__(self, id, f1='', f2='', f3='', t1='', t2='', k1=[]): ... def __init__(self, id, f1='', f2='', f3='', t1='', t2='', k1=[]):
... self.id = id ... self.id = id

View file

@ -6,9 +6,9 @@
import zope.index.keyword import zope.index.keyword
import zope.interface import zope.interface
import zope.app.container.contained
import zope.catalog.attribute import zope.catalog.attribute
import zope.catalog.interfaces import zope.catalog.interfaces
import zope.container.contained
class IKeywordIndex(zope.catalog.interfaces.IAttributeIndex, class IKeywordIndex(zope.catalog.interfaces.IAttributeIndex,
@ -20,6 +20,6 @@ class IKeywordIndex(zope.catalog.interfaces.IAttributeIndex,
@zope.interface.implementer(IKeywordIndex) @zope.interface.implementer(IKeywordIndex)
class KeywordIndex(zope.catalog.attribute.AttributeIndex, class KeywordIndex(zope.catalog.attribute.AttributeIndex,
zope.index.keyword.KeywordIndex, zope.index.keyword.KeywordIndex,
zope.app.container.contained.Contained): zope.container.contained.Contained):
pass pass

View file

@ -1,30 +1,11 @@
# # cybertools.composer.schema.browser.form
# Copyright (c) 2007 Helmut Merz helmutm@cy55.de
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
""" """ View(s) for forms based on composer.schema.
View(s) for forms based on composer.schema.
$Id$
""" """
from zope import component, interface from zope import component, interface
from zope.app.container.interfaces import INameChooser
from zope.cachedescriptors.property import Lazy from zope.cachedescriptors.property import Lazy
from zope.container.interfaces import INameChooser
from zope.interface import Interface from zope.interface import Interface
from zope.event import notify from zope.event import notify
from zope.lifecycleevent import ObjectCreatedEvent, ObjectModifiedEvent from zope.lifecycleevent import ObjectCreatedEvent, ObjectModifiedEvent

View file

@ -1,11 +1,9 @@
Ordered Containers Ordered Containers
================== ==================
($Id$)
Let's add an ordered container and place some objects in it: Let's add an ordered container and place some objects in it:
>>> from zope.app.container.ordered import OrderedContainer >>> from zope.container.ordered import OrderedContainer
>>> c1 = OrderedContainer() >>> c1 = OrderedContainer()
>>> c1['sub1'] = OrderedContainer() >>> c1['sub1'] = OrderedContainer()
>>> c1['sub2'] = OrderedContainer() >>> c1['sub2'] = OrderedContainer()

View file

@ -3,8 +3,8 @@
""" Ordered container implementation. """ Ordered container implementation.
""" """
from zope.browserpage import ViewPageTemplateFile
from zope.app.container.browser.contents import JustContents from zope.app.container.browser.contents import JustContents
from zope.browserpage import ViewPageTemplateFile
from zope.i18nmessageid import ZopeMessageFactory as _ from zope.i18nmessageid import ZopeMessageFactory as _
from zope.cachedescriptors.property import Lazy from zope.cachedescriptors.property import Lazy
from zope.interface import Interface from zope.interface import Interface

View file

@ -6,7 +6,7 @@
i18n_domain="zope"> i18n_domain="zope">
<page <page
for="zope.app.container.interfaces.IOrderedContainer" for="zope.container.interfaces.IOrderedContainer"
name="contents.html" name="contents.html"
template="contents.pt" template="contents.pt"
class=".ordered.OrderedContainerView" class=".ordered.OrderedContainerView"
@ -15,7 +15,7 @@
/> />
<page <page
for="zope.app.container.interfaces.IContainer" for="zope.container.interfaces.IContainer"
name="contents.html" name="contents.html"
template="contents.pt" template="contents.pt"
class="cybertools.container.ordered.ContainerView" class="cybertools.container.ordered.ContainerView"
@ -24,7 +24,7 @@
/> />
<page <page
for="zope.app.container.interfaces.IContainer" for="zope.container.interfaces.IContainer"
name="ajax.inner.html" name="ajax.inner.html"
template="../ajax/innerHtml.pt" template="../ajax/innerHtml.pt"
class="cybertools.container.base.ContainerView" class="cybertools.container.base.ContainerView"

View file

@ -3,8 +3,8 @@
""" Ordered container implementation. """ Ordered container implementation.
""" """
from zope.app.container.ordered import OrderedContainer as BaseOrderedContainer
from zope.cachedescriptors.property import Lazy from zope.cachedescriptors.property import Lazy
from zope.container.ordered import OrderedContainer as BaseOrderedContainer
from zope.i18nmessageid import ZopeMessageFactory as _ from zope.i18nmessageid import ZopeMessageFactory as _
from zope.interface import Interface from zope.interface import Interface
from base import ContainerView from base import ContainerView

View file

@ -6,7 +6,7 @@
import mimetypes import mimetypes
import os import os
from urllib.parse import urlencode from urllib.parse import urlencode
from zope.app.container.contained import Contained from zope.container.contained import Contained
from zope.cachedescriptors.property import Lazy from zope.cachedescriptors.property import Lazy
from zope import component from zope import component
from zope.interface import implementer from zope.interface import implementer

View file

@ -1,30 +1,11 @@
# # cybertools.integrator interfaces
# Copyright (c) 2008 Helmut Merz helmutm@cy55.de
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
""" """ External content integration interfaces.
External content integration interfaces.
$Id$
""" """
from zope.app.container.interfaces import IReadContainer
from zope.app.file.interfaces import IFile, IImage from zope.app.file.interfaces import IFile, IImage
from zope.app.publication.interfaces import IFileContent from zope.app.publication.interfaces import IFileContent
from zope.container.interfaces import IReadContainer
from zope.interface import Interface, Attribute from zope.interface import Interface, Attribute

View file

@ -329,8 +329,8 @@ provides a simple handler for this event. (In real life all this is
done via configure.zcml - see relation/configure.zcml for an example that done via configure.zcml - see relation/configure.zcml for an example that
also provides the default behaviour.) also provides the default behaviour.)
>>> from zope.app.container.interfaces import IObjectRemovedEvent >>> from zope.lifecycleevent.interfaces import IObjectRemovedEvent
>>> from zope.app.container.contained import ObjectRemovedEvent >>> from zope.container.contained import ObjectRemovedEvent
>>> from zope.event import notify >>> from zope.event import notify
>>> from zope.interface import Interface >>> from zope.interface import Interface
>>> from cybertools.relation.registry import invalidateRelations >>> from cybertools.relation.registry import invalidateRelations

View file

@ -1,5 +1,3 @@
<!-- $Id$ -->
<configure <configure
xmlns="http://namespaces.zope.org/zope" xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser" xmlns:browser="http://namespaces.zope.org/browser"
@ -15,15 +13,15 @@
interface=".interfaces.IRelationRegistryUpdate" interface=".interfaces.IRelationRegistryUpdate"
/> />
<require <require
interface="zope.app.catalog.interfaces.ICatalogQuery" interface="zope.catalog.interfaces.ICatalogQuery"
permission="zope.View" permission="zope.View"
/> />
<require <require
interface="zope.app.catalog.interfaces.ICatalogEdit" interface="zope.catalog.interfaces.ICatalogEdit"
permission="zope.ManageServices" permission="zope.ManageServices"
/> />
<require <require
interface="zope.app.container.interfaces.IContainer" interface="zope.container.interfaces.IContainer"
permission="zope.ManageServices" permission="zope.ManageServices"
/> />
<factory id="cybertools.relation.registry.RelationRegistry" /> <factory id="cybertools.relation.registry.RelationRegistry" />
@ -38,13 +36,13 @@
<subscriber <subscriber
for=".interfaces.IRelationRegistry for=".interfaces.IRelationRegistry
zope.app.container.interfaces.IObjectAddedEvent" zope.lifecycleevent.interfaces.IObjectAddedEvent"
handler=".registry.setupIndexes" handler=".registry.setupIndexes"
/> />
<subscriber <subscriber
for="zope.interface.Interface for="zope.interface.Interface
zope.app.container.interfaces.IObjectRemovedEvent" zope.lifecycleevent.interfaces.IObjectRemovedEvent"
handler=".registry.invalidateRelations" handler=".registry.invalidateRelations"
/> />

View file

@ -1,32 +1,13 @@
# # cybertools.storage.pzope.base
# Copyright (c) 2011 Helmut Merz helmutm@cy55.de
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
""" """ Storage manager implementation for a full Zope 3 environment.
Storage manager implementation for a full Zope 3 environment.
$Id$
""" """
from persistent import Persistent from persistent import Persistent
from zope import component from zope import component
from zope.interface import implements from zope.interface import implements
from zope.app.component.hooks import getSite from zope.component.hooks import getSite
from zope.app.container.interfaces import IContained from zope.container.interfaces import IContained
from zope.intid.interfaces import IIntIds from zope.intid.interfaces import IIntIds
from zope.traversing.api import traverse, getPath from zope.traversing.api import traverse, getPath

View file

@ -1,28 +1,9 @@
# # cybertools.typology.interfaces
# Copyright (c) 2006 Helmut Merz helmutm@cy55.de
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
""" """ interface definitions for the typology package.
interface definitions for the typology package.
$Id$
""" """
from zope.app.container.interfaces import IContainer from zope.container.interfaces import IContainer
from zope import schema from zope import schema
from zope.configuration.fields import GlobalObject from zope.configuration.fields import GlobalObject
from zope.interface import Interface, Attribute from zope.interface import Interface, Attribute