[Checkins] SVN: Sandbox/faassen/zope.site/trunk/ Start fixing imports and package references, and simplify interfaces from
Martijn Faassen
faassen at infrae.com
Tue Jan 27 07:23:38 EST 2009
Log message for revision 95149:
Start fixing imports and package references, and simplify interfaces from
a package into a module.
Changed:
U Sandbox/faassen/zope.site/trunk/buildout.cfg
U Sandbox/faassen/zope.site/trunk/setup.py
U Sandbox/faassen/zope.site/trunk/src/zope/site/configure.zcml
U Sandbox/faassen/zope.site/trunk/src/zope/site/ftesting.zcml
D Sandbox/faassen/zope.site/trunk/src/zope/site/interfaces/
A Sandbox/faassen/zope.site/trunk/src/zope/site/interfaces.py
U Sandbox/faassen/zope.site/trunk/src/zope/site/site.py
-=-
Modified: Sandbox/faassen/zope.site/trunk/buildout.cfg
===================================================================
--- Sandbox/faassen/zope.site/trunk/buildout.cfg 2009-01-27 12:22:26 UTC (rev 95148)
+++ Sandbox/faassen/zope.site/trunk/buildout.cfg 2009-01-27 12:23:38 UTC (rev 95149)
@@ -4,11 +4,11 @@
[test]
recipe = zc.recipe.testrunner
-eggs = zope.app.component [test]
+eggs = zope.site [test]
[coverage-test]
recipe = zc.recipe.testrunner
-eggs = zope.app.component [test]
+eggs = zope.site [test]
defaults = ['--coverage', '../../coverage']
[coverage-report]
Modified: Sandbox/faassen/zope.site/trunk/setup.py
===================================================================
--- Sandbox/faassen/zope.site/trunk/setup.py 2009-01-27 12:22:26 UTC (rev 95148)
+++ Sandbox/faassen/zope.site/trunk/setup.py 2009-01-27 12:23:38 UTC (rev 95149)
@@ -32,9 +32,9 @@
'Detailed Documentation\n'
'**********************\n'
+ '\n\n' +
- read('src', 'zope', 'app', 'component', 'README.txt')
+ read('src', 'zope', 'site', 'README.txt')
+ '\n\n' +
- read('src', 'zope', 'app', 'component', 'site.txt')
+ read('src', 'zope', 'site', 'site.txt')
+ '\n\n' +
read('CHANGES.txt')
),
Modified: Sandbox/faassen/zope.site/trunk/src/zope/site/configure.zcml
===================================================================
--- Sandbox/faassen/zope.site/trunk/src/zope/site/configure.zcml 2009-01-27 12:22:26 UTC (rev 95148)
+++ Sandbox/faassen/zope.site/trunk/src/zope/site/configure.zcml 2009-01-27 12:23:38 UTC (rev 95149)
@@ -68,22 +68,4 @@
/>
- <!-- the 'Interfaces' vocabulary below requires a registred IInterface -->
- <interface
- interface="zope.interface.interfaces.IInterface"
- />
-
- <!-- Vocabularies -->
-
- <utility
- component=".vocabulary.InterfacesVocabulary"
- name="Interfaces"
- />
-
- <utility
- component=".vocabulary.UtilityComponentInterfacesVocabulary"
- provides="zope.schema.interfaces.IVocabularyFactory"
- name="Utility Component Interfaces"
- />
-
</configure>
Modified: Sandbox/faassen/zope.site/trunk/src/zope/site/ftesting.zcml
===================================================================
--- Sandbox/faassen/zope.site/trunk/src/zope/site/ftesting.zcml 2009-01-27 12:22:26 UTC (rev 95148)
+++ Sandbox/faassen/zope.site/trunk/src/zope/site/ftesting.zcml 2009-01-27 12:23:38 UTC (rev 95149)
@@ -1,7 +1,7 @@
<configure
xmlns="http://namespaces.zope.org/zope"
i18n_domain="zope"
- package="zope.app.component"
+ package="zope.site"
>
<!-- This file is the equivalent of site.zcml and it is -->
Copied: Sandbox/faassen/zope.site/trunk/src/zope/site/interfaces.py (from rev 95131, Sandbox/faassen/zope.site/trunk/src/zope/site/interfaces/__init__.py)
===================================================================
--- Sandbox/faassen/zope.site/trunk/src/zope/site/interfaces.py (rev 0)
+++ Sandbox/faassen/zope.site/trunk/src/zope/site/interfaces.py 2009-01-27 12:23:38 UTC (rev 95149)
@@ -0,0 +1,83 @@
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Interfaces for the Local Component Architecture
+
+$Id$
+"""
+
+import zope.deferredimport
+import zope.interface
+import zope.component.interfaces
+import zope.app.container.interfaces
+
+zope.deferredimport.deprecatedFrom(
+ "Moved to zope.location.interfaces. Importing from here will stop working in Zope 3.6",
+ "zope.location.interfaces",
+ "ISite", "IPossibleSite")
+
+class INewLocalSite(zope.interface.Interface):
+ """Event: a local site was created
+ """
+
+ manager = zope.interface.Attribute("The new site manager")
+
+class NewLocalSite:
+ """Event: a local site was created
+ """
+ zope.interface.implements(INewLocalSite)
+
+ def __init__(self, manager):
+ self.manager = manager
+
+
+class ILocalSiteManager(zope.component.interfaces.IComponents):
+ """Site Managers act as containers for registerable components.
+
+ If a Site Manager is asked for an adapter or utility, it checks for those
+ it contains before using a context-based lookup to find another site
+ manager to delegate to. If no other site manager is found they defer to
+ the global site manager which contains file based utilities and adapters.
+ """
+
+ subs = zope.interface.Attribute(
+ "A collection of registries that describe the next level "
+ "of the registry tree. They are the children of this "
+ "registry node. This attribute should never be "
+ "manipulated manually. Use `addSub()` and `removeSub()` "
+ "instead.")
+
+ def addSub(sub):
+ """Add a new sub-registry to the node.
+
+ Important: This method should *not* be used manually. It is
+ automatically called by `setNext()`. To add a new registry to the
+ tree, use `sub.setNext(self, self.base)` instead!
+ """
+
+ def removeSub(sub):
+ """Remove a sub-registry to the node.
+
+ Important: This method should *not* be used manually. It is
+ automatically called by `setNext()`. To remove a registry from the
+ tree, use `sub.setNext(None)` instead!
+ """
+
+
+class ISiteManagementFolder(zope.app.container.interfaces.IContainer):
+ """Component and component registration containers."""
+
+ # XXX we need to figure out how to constrain this or, alternatively,
+ # just use regular folders, which is probably the beter choice.
+ # zope.app.container.constraints.containers(ILocalSiteManager)
+
Property changes on: Sandbox/faassen/zope.site/trunk/src/zope/site/interfaces.py
___________________________________________________________________
Added: cvs2svn:cvs-rev
+ 1.3
Added: svn:keywords
+ Id
Added: svn:mergeinfo
+
Added: svn:eol-style
+ native
Modified: Sandbox/faassen/zope.site/trunk/src/zope/site/site.py
===================================================================
--- Sandbox/faassen/zope.site/trunk/src/zope/site/site.py 2009-01-27 12:22:26 UTC (rev 95148)
+++ Sandbox/faassen/zope.site/trunk/src/zope/site/site.py 2009-01-27 12:23:38 UTC (rev 95149)
@@ -39,11 +39,12 @@
from zope.lifecycleevent import ObjectCreatedEvent
from zope.filerepresentation.interfaces import IDirectoryFactory
-from zope.app.component import interfaces
-from zope.app.component.hooks import setSite
from zope.app.container.btree import BTreeContainer
from zope.app.container.contained import Contained
+from zope.site import interfaces
+from zope.site.hooks import setSite
+
##############################################################################
# from zope.app.module import resolve
More information about the Checkins
mailing list