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 @@
#
# 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
#
# cybertools.browser.url
""" URL manipulation utilities
$Id$
"""
from urlparse import urlparse
from zope.app.container.traversal import ItemTraverser
from zope.container.traversal import ItemTraverser
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
to index and query.
>>> from zope.app.container.contained import Contained
>>> from zope.container.contained import Contained
>>> class Content(Contained):
... def __init__(self, id, f1='', f2='', f3='', t1='', t2='', k1=[]):
... self.id = id

View file

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

View file

@ -1,30 +1,11 @@
#
# 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
#
# cybertools.composer.schema.browser.form
"""
View(s) for forms based on composer.schema.
$Id$
""" View(s) for forms based on composer.schema.
"""
from zope import component, interface
from zope.app.container.interfaces import INameChooser
from zope.cachedescriptors.property import Lazy
from zope.container.interfaces import INameChooser
from zope.interface import Interface
from zope.event import notify
from zope.lifecycleevent import ObjectCreatedEvent, ObjectModifiedEvent

View file

@ -1,11 +1,9 @@
Ordered Containers
==================
($Id$)
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['sub1'] = OrderedContainer()
>>> c1['sub2'] = OrderedContainer()

View file

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

View file

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

View file

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

View file

@ -6,7 +6,7 @@
import mimetypes
import os
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 import component
from zope.interface import implementer

View file

@ -1,30 +1,11 @@
#
# 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
#
# cybertools.integrator interfaces
"""
External content integration interfaces.
$Id$
""" External content integration interfaces.
"""
from zope.app.container.interfaces import IReadContainer
from zope.app.file.interfaces import IFile, IImage
from zope.app.publication.interfaces import IFileContent
from zope.container.interfaces import IReadContainer
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
also provides the default behaviour.)
>>> from zope.app.container.interfaces import IObjectRemovedEvent
>>> from zope.app.container.contained import ObjectRemovedEvent
>>> from zope.lifecycleevent.interfaces import IObjectRemovedEvent
>>> from zope.container.contained import ObjectRemovedEvent
>>> from zope.event import notify
>>> from zope.interface import Interface
>>> from cybertools.relation.registry import invalidateRelations

View file

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

View file

@ -1,32 +1,13 @@
#
# 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
#
# cybertools.storage.pzope.base
"""
Storage manager implementation for a full Zope 3 environment.
$Id$
""" Storage manager implementation for a full Zope 3 environment.
"""
from persistent import Persistent
from zope import component
from zope.interface import implements
from zope.app.component.hooks import getSite
from zope.app.container.interfaces import IContained
from zope.component.hooks import getSite
from zope.container.interfaces import IContained
from zope.intid.interfaces import IIntIds
from zope.traversing.api import traverse, getPath

View file

@ -1,28 +1,9 @@
#
# 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
#
# cybertools.typology.interfaces
"""
interface definitions for the typology package.
$Id$
""" interface definitions for the typology package.
"""
from zope.app.container.interfaces import IContainer
from zope.container.interfaces import IContainer
from zope import schema
from zope.configuration.fields import GlobalObject
from zope.interface import Interface, Attribute