Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
ca41f85c
Commit
ca41f85c
authored
Feb 04, 2009
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make use of the new zope.container and zope.site packages.
parent
cc384419
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
37 additions
and
48 deletions
+37
-48
doc/CHANGES.txt
doc/CHANGES.txt
+3
-1
lib/python/OFS/CopySupport.py
lib/python/OFS/CopySupport.py
+2
-2
lib/python/OFS/ObjectManager.py
lib/python/OFS/ObjectManager.py
+4
-4
lib/python/OFS/OrderSupport.py
lib/python/OFS/OrderSupport.py
+1
-1
lib/python/OFS/subscribers.py
lib/python/OFS/subscribers.py
+2
-2
lib/python/Products/BTreeFolder2/BTreeFolder2.py
lib/python/Products/BTreeFolder2/BTreeFolder2.py
+3
-3
lib/python/Products/Five/browser/adding.py
lib/python/Products/Five/browser/adding.py
+6
-4
lib/python/Products/Five/browser/configure.zcml
lib/python/Products/Five/browser/configure.zcml
+1
-1
lib/python/Products/Five/component/__init__.py
lib/python/Products/Five/component/__init__.py
+2
-2
lib/python/Products/Five/component/browser.py
lib/python/Products/Five/component/browser.py
+2
-2
lib/python/Products/Five/component/configure.zcml
lib/python/Products/Five/component/configure.zcml
+2
-2
lib/python/Products/Five/component/makesite.txt
lib/python/Products/Five/component/makesite.txt
+1
-1
lib/python/Products/Five/doc/directives.txt
lib/python/Products/Five/doc/directives.txt
+0
-15
lib/python/Products/Five/doc/event.txt
lib/python/Products/Five/doc/event.txt
+2
-2
lib/python/Products/Five/eventconfigure.py
lib/python/Products/Five/eventconfigure.py
+1
-1
lib/python/Products/Five/tests/event.txt
lib/python/Products/Five/tests/event.txt
+1
-1
lib/python/Testing/ZopeTestCase/functional.py
lib/python/Testing/ZopeTestCase/functional.py
+2
-2
lib/python/webdav/Resource.py
lib/python/webdav/Resource.py
+2
-2
No files found.
doc/CHANGES.txt
View file @
ca41f85c
...
...
@@ -9,8 +9,10 @@ Zope Changes
Restructuring
- Make use of the new zope.container and zope.site packages.
- Updated to newer versions of zope packages. Removed long deprecated
defaultSkin,
layer and skin ZCML directives.
layer and skin ZCML directives.
- Disabled the XML export on the UI level - the export functionality
however is still available on the Python level.
...
...
lib/python/OFS/CopySupport.py
View file @
ca41f85c
...
...
@@ -48,8 +48,8 @@ from ZODB.POSException import ConflictError
from
zope.interface
import
implements
from
zope.event
import
notify
from
zope.lifecycleevent
import
ObjectCopiedEvent
from
zope.
app.
container.contained
import
ObjectMovedEvent
from
zope.
app.
container.contained
import
notifyContainerModified
from
zope.container.contained
import
ObjectMovedEvent
from
zope.container.contained
import
notifyContainerModified
from
OFS.event
import
ObjectWillBeMovedEvent
from
OFS.event
import
ObjectClonedEvent
...
...
lib/python/OFS/ObjectManager.py
View file @
ca41f85c
...
...
@@ -52,10 +52,10 @@ from ZODB.POSException import ConflictError
from
zope.interface
import
implements
from
zope.component.interfaces
import
ComponentLookupError
from
zope.event
import
notify
from
zope.
app.
container.contained
import
ObjectAddedEvent
from
zope.
app.
container.contained
import
ObjectRemovedEvent
from
zope.
app.
container.contained
import
notifyContainerModified
from
zope.
app.
container.interfaces
import
IContainer
from
zope.container.contained
import
ObjectAddedEvent
from
zope.container.contained
import
ObjectRemovedEvent
from
zope.container.contained
import
notifyContainerModified
from
zope.container.interfaces
import
IContainer
from
zope.interface
import
implements
from
OFS.CopySupport
import
CopyContainer
...
...
lib/python/OFS/OrderSupport.py
View file @
ca41f85c
...
...
@@ -24,7 +24,7 @@ from Acquisition import aq_base
from
App.class_init
import
InitializeClass
from
DocumentTemplate.sequence
import
sort
from
zope.interface
import
implements
from
zope.
app.
container.contained
import
notifyContainerModified
from
zope.container.contained
import
notifyContainerModified
from
OFS.interfaces
import
IOrderedContainer
as
IOrderedContainer
from
OFS.ObjectManager
import
ObjectManager
...
...
lib/python/OFS/subscribers.py
View file @
ca41f85c
...
...
@@ -29,8 +29,8 @@ from ZODB.POSException import ConflictError
import
zope.component
import
zope.interface
import
zope.location.interfaces
from
zope.
app.
container.contained
import
dispatchToSublocations
from
zope.
app.
container.interfaces
import
IObjectMovedEvent
from
zope.container.contained
import
dispatchToSublocations
from
zope.container.interfaces
import
IObjectMovedEvent
from
zope.lifecycleevent.interfaces
import
IObjectCopiedEvent
deprecatedManageAddDeleteClasses
=
[]
...
...
lib/python/Products/BTreeFolder2/BTreeFolder2.py
View file @
ca41f85c
...
...
@@ -43,9 +43,9 @@ from Persistence import Persistent
from
Products.ZCatalog.Lazy
import
LazyMap
from
ZODB.POSException
import
ConflictError
from
zope.event
import
notify
from
zope.
app.
container.contained
import
ObjectAddedEvent
from
zope.
app.
container.contained
import
ObjectRemovedEvent
from
zope.
app.
container.contained
import
notifyContainerModified
from
zope.container.contained
import
ObjectAddedEvent
from
zope.container.contained
import
ObjectRemovedEvent
from
zope.container.contained
import
notifyContainerModified
LOG
=
getLogger
(
'BTreeFolder2'
)
...
...
lib/python/Products/Five/browser/adding.py
View file @
ca41f85c
...
...
@@ -30,6 +30,11 @@ from zope.component import getUtility
from
zope.component
import
queryMultiAdapter
from
zope.component
import
queryUtility
from
zope.component.interfaces
import
IFactory
from
zope.container.constraints
import
checkFactory
,
checkObject
from
zope.container.i18n
import
ZopeMessageFactory
as
_
from
zope.container.interfaces
import
IContainerNamesContainer
from
zope.container.interfaces
import
INameChooser
from
zope.event
import
notify
from
zope.interface
import
implements
from
zope.publisher.interfaces
import
IPublishTraverse
...
...
@@ -37,10 +42,7 @@ from zope.traversing.browser.absoluteurl import absoluteURL
from
zope.exceptions.interfaces
import
UserError
from
zope.lifecycleevent
import
ObjectCreatedEvent
from
zope.app.container.constraints
import
checkFactory
,
checkObject
from
zope.app.container.i18n
import
ZopeMessageFactory
as
_
from
zope.app.container.interfaces
import
IAdding
,
INameChooser
from
zope.app.container.interfaces
import
IContainerNamesContainer
from
zope.app.container.interfaces
import
IAdding
from
zope.app.publisher.browser.menu
import
getMenu
from
zExceptions
import
BadRequest
...
...
lib/python/Products/Five/browser/configure.zcml
View file @
ca41f85c
...
...
@@ -72,7 +72,7 @@
<adapter
for="OFS.interfaces.IObjectManager"
factory=".adding.ObjectManagerNameChooser"
provides="zope.
app.
container.interfaces.INameChooser"
provides="zope.container.interfaces.INameChooser"
/>
<!-- Menu access -->
...
...
lib/python/Products/Five/component/__init__.py
View file @
ca41f85c
...
...
@@ -29,8 +29,8 @@ from ZPublisher.BeforeTraverse import registerBeforeTraverse
from
ZPublisher.BeforeTraverse
import
unregisterBeforeTraverse
# Hook up custom component architecture calls
import
zope.app.component.h
ooks
zope
.
app
.
component
.
hooks
.
setHooks
()
from
zope.site.hooks
import
setH
ooks
setHooks
()
def
findSite
(
obj
,
iface
=
ISite
):
"""Find a site by walking up the object hierarchy, supporting both
...
...
lib/python/Products/Five/component/browser.py
View file @
ca41f85c
...
...
@@ -21,7 +21,7 @@ from Products.Five.component.interfaces import IObjectManagerSite
from
zope.component.globalregistry
import
base
from
zope.component.persistentregistry
import
PersistentComponents
from
zope.
app.component.hooks
import
clear
Site
from
zope.
site.hooks
import
set
Site
class
ObjectManagerSiteView
(
BrowserView
):
...
...
@@ -59,6 +59,6 @@ class ObjectManagerSiteView(BrowserView):
# it can't be found anymore. So, for the rest of this request
# (which will be over in about 20 CPU cycles), already clear
# the local site from the thread local.
clear
Site
()
set
Site
()
self
.
context
.
setSiteManager
(
None
)
lib/python/Products/Five/component/configure.zcml
View file @
ca41f85c
...
...
@@ -6,12 +6,12 @@
<subscriber
for="zope.location.interfaces.ISite
zope.app.publication.interfaces.IBeforeTraverseEvent"
handler="zope.
app.component
.site.threadSiteSubscriber"
handler="zope.
site
.site.threadSiteSubscriber"
/>
<subscriber
for="zope.app.publication.interfaces.IEndRequestEvent"
handler="zope.
app.component
.site.clearThreadSiteSubscriber"
handler="zope.
site
.site.clearThreadSiteSubscriber"
/>
<browser:page
...
...
lib/python/Products/Five/component/makesite.txt
View file @
ca41f85c
...
...
@@ -18,7 +18,7 @@ Load all of Five's configuration (this is a functional test):
Enable local component lookup hooks:
>>> from zope.
app.component
.hooks import setHooks
>>> from zope.
site
.hooks import setHooks
>>> setHooks()
...
...
lib/python/Products/Five/doc/directives.txt
View file @
ca41f85c
...
...
@@ -32,11 +32,6 @@ redefinePermission
Redefine a permission in included ZCML as another one.
skin
----
Declare a skin, consisting of layers.
utility
-------
...
...
@@ -73,11 +68,6 @@ defaultView
Declare the name of the view that should be used for the default when viewing
the object; i.e. when the object is traversed to without a view.
defaultSkin
-----------
Declare the default skin used.
editform
--------
...
...
@@ -88,11 +78,6 @@ addform
Create an add form based on a schema.
layer
-----
Declare a layer.
menu
----
...
...
lib/python/Products/Five/doc/event.txt
View file @
ca41f85c
...
...
@@ -131,7 +131,7 @@ zcml, so in ``configure.zcml`` we'll add::
...
<subscriber
for="Products.CoolProduct.interfaces.ICoolDocument
zope.
app.
container.interfaces.IObjectAddedEvent"
zope.container.interfaces.IObjectAddedEvent"
handler="Products.CoolProduct.CoolDocument.addedCoolDocument"
/>
...
...
...
@@ -214,7 +214,7 @@ And replace the subscriber with::
...
<subscriber
for="Products.CoolProduct.interfaces.ICoolDocument
zope.
app.
container.interfaces.IObjectMovedEvent"
zope.container.interfaces.IObjectMovedEvent"
handler="Products.CoolProduct.CoolDocument.movedCoolDocument"
/>
...
...
...
lib/python/Products/Five/eventconfigure.py
View file @
ca41f85c
...
...
@@ -12,7 +12,7 @@
#
##############################################################################
"""
Use 'structured monkey patching' to enable zope.
app.
container event sending for
Use 'structured monkey patching' to enable zope.container event sending for
Zope 2 objects.
$Id$
...
...
lib/python/Products/Five/tests/event.txt
View file @
ca41f85c
...
...
@@ -56,7 +56,7 @@ framework's ones, so ours will be called first. This has the effect that
printed events will be in their "natural" order::
>>> from zope.component.interfaces import IObjectEvent, IRegistrationEvent
>>> from zope.
app.
container.interfaces import IObjectMovedEvent
>>> from zope.container.interfaces import IObjectMovedEvent
>>> from zope.lifecycleevent.interfaces import IObjectCopiedEvent
>>> from OFS.interfaces import IObjectWillBeMovedEvent
>>> from OFS.interfaces import IObjectClonedEvent
...
...
lib/python/Testing/ZopeTestCase/functional.py
View file @
ca41f85c
...
...
@@ -31,8 +31,8 @@ def savestate(func):
'''
from
AccessControl.SecurityManagement
import
getSecurityManager
from
AccessControl.SecurityManagement
import
setSecurityManager
from
zope.
app.component
.hooks
import
getSite
from
zope.
app.component
.hooks
import
setSite
from
zope.
site
.hooks
import
getSite
from
zope.
site
.hooks
import
setSite
def
wrapped_func
(
*
args
,
**
kw
):
sm
,
site
=
getSecurityManager
(),
getSite
()
...
...
lib/python/webdav/Resource.py
View file @
ca41f85c
...
...
@@ -47,8 +47,8 @@ from ZPublisher.HTTPRangeSupport import HTTPRangeInterface
from
zope.interface
import
implements
from
zope.event
import
notify
from
zope.lifecycleevent
import
ObjectCopiedEvent
from
zope.
app.
container.contained
import
ObjectMovedEvent
from
zope.
app.
container.contained
import
notifyContainerModified
from
zope.container.contained
import
ObjectMovedEvent
from
zope.container.contained
import
notifyContainerModified
from
webdav.Lockable
import
LockableItem
from
webdav.Lockable
import
wl_isLockable
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment