[Checkins] SVN: zope.app.component/trunk/ - Import hooks functionality from zope.component after it was moved there from
Thomas Lotze
tl at gocept.com
Wed Nov 18 11:31:50 EST 2009
Log message for revision 105836:
- Import hooks functionality from zope.component after it was moved there from
zope.site.
- Import ISite and IPossibleSite from zope.component after they were moved
there from zope.location. This lifts the direct dependency on zope.location.
Changed:
U zope.app.component/trunk/CHANGES.txt
U zope.app.component/trunk/setup.py
U zope.app.component/trunk/src/zope/app/component/browser/__init__.py
U zope.app.component/trunk/src/zope/app/component/browser/configure.zcml
U zope.app.component/trunk/src/zope/app/component/hooks.py
U zope.app.component/trunk/src/zope/app/component/interfaces/__init__.py
U zope.app.component/trunk/src/zope/app/component/site.py
-=-
Modified: zope.app.component/trunk/CHANGES.txt
===================================================================
--- zope.app.component/trunk/CHANGES.txt 2009-11-18 16:30:11 UTC (rev 105835)
+++ zope.app.component/trunk/CHANGES.txt 2009-11-18 16:31:50 UTC (rev 105836)
@@ -5,9 +5,13 @@
3.8.4 (unreleased)
------------------
-- Nothing changed yet.
+- Import hooks functionality from zope.component after it was moved there from
+ zope.site.
+- Import ISite and IPossibleSite from zope.component after they were moved
+ there from zope.location. This lifts the direct dependency on zope.location.
+
3.8.3 (2009-07-11)
------------------
Modified: zope.app.component/trunk/setup.py
===================================================================
--- zope.app.component/trunk/setup.py 2009-11-18 16:30:11 UTC (rev 105835)
+++ zope.app.component/trunk/setup.py 2009-11-18 16:31:50 UTC (rev 105836)
@@ -77,7 +77,6 @@
'zope.i18nmessageid',
'zope.interface',
'zope.lifecycleevent',
- 'zope.location>3.4.0b1',
'zope.publisher>=3.6.0',
'zope.schema',
'zope.security',
Modified: zope.app.component/trunk/src/zope/app/component/browser/__init__.py
===================================================================
--- zope.app.component/trunk/src/zope/app/component/browser/__init__.py 2009-11-18 16:30:11 UTC (rev 105835)
+++ zope.app.component/trunk/src/zope/app/component/browser/__init__.py 2009-11-18 16:31:50 UTC (rev 105836)
@@ -18,12 +18,12 @@
__docformat__ = 'restructuredtext'
import zope.component
+import zope.component.interfaces
from zope.exceptions.interfaces import UserError
from zope.security.proxy import removeSecurityProxy
from zope.publisher.browser import BrowserView
from zope.component.interfaces import IFactory
from zope.component.interface import searchInterface
-from zope.location.interfaces import ISite
from zope.app.component.i18n import ZopeMessageFactory as _
from zope.app.container.browser.adding import Adding
@@ -119,7 +119,7 @@
... implements(IContainmentRoot)
... def setSiteManager(self, sm):
... from zope.interface import directlyProvides
- ... directlyProvides(self, ISite)
+ ... directlyProvides(self, zope.component.interfaces.ISite)
>>> folder = PossibleSite()
@@ -133,7 +133,7 @@
Now verify that we have a site:
- >>> ISite.providedBy(folder)
+ >>> zope.component.interfaces.ISite.providedBy(folder)
1
Note that we've also redirected the request:
@@ -152,7 +152,7 @@
UserError: This is already a site
"""
- if ISite.providedBy(self.context):
+ if zope.component.interfaces.ISite.providedBy(self.context):
raise UserError(_(u'This is already a site'))
# We don't want to store security proxies (we can't,
Modified: zope.app.component/trunk/src/zope/app/component/browser/configure.zcml
===================================================================
--- zope.app.component/trunk/src/zope/app/component/browser/configure.zcml 2009-11-18 16:30:11 UTC (rev 105835)
+++ zope.app.component/trunk/src/zope/app/component/browser/configure.zcml 2009-11-18 16:31:50 UTC (rev 105836)
@@ -68,7 +68,7 @@
<!-- Site Manager navigation action -->
<browser:page
- for="zope.location.interfaces.IPossibleSite"
+ for="zope.component.interfaces.IPossibleSite"
name="addSiteManager.html"
permission="zope.ManageSite"
class=".MakeSite"
@@ -77,17 +77,17 @@
<browser:menuItem
menu="zmi_actions" title="Make a site"
- for="zope.location.interfaces.IPossibleSite"
+ for="zope.component.interfaces.IPossibleSite"
action="@@addSiteManager.html"
filter="python:
- not modules['zope.location.interfaces'].ISite.providedBy(context)"
+ not modules['zope.component.interfaces'].ISite.providedBy(context)"
permission="zope.ManageSite"
/>
<browser:menuItem
menu="zmi_actions"
title="Manage Site"
- for="zope.location.interfaces.ISite"
+ for="zope.component.interfaces.ISite"
action="++etc++site/@@SelectedManagementView.html"
permission="zope.ManageSite"
/>
Modified: zope.app.component/trunk/src/zope/app/component/hooks.py
===================================================================
--- zope.app.component/trunk/src/zope/app/component/hooks.py 2009-11-18 16:30:11 UTC (rev 105835)
+++ zope.app.component/trunk/src/zope/app/component/hooks.py 2009-11-18 16:31:50 UTC (rev 105836)
@@ -13,13 +13,14 @@
##############################################################################
"""This module here is for backwards compatibility.
-The real public API is now zope.site.hooks
+The real public API is now zope.component.hooks
$Id$
"""
__docformat__ = 'restructuredtext'
-from zope.site.hooks import (read_property,
+from zope.component.hooks import (
+ read_property,
SiteInfo,
siteinfo,
setSite,
@@ -30,4 +31,3 @@
resetHooks,
setSite,
clearSite) # BBB
-
Modified: zope.app.component/trunk/src/zope/app/component/interfaces/__init__.py
===================================================================
--- zope.app.component/trunk/src/zope/app/component/interfaces/__init__.py 2009-11-18 16:30:11 UTC (rev 105835)
+++ zope.app.component/trunk/src/zope/app/component/interfaces/__init__.py 2009-11-18 16:31:50 UTC (rev 105836)
@@ -25,7 +25,6 @@
ISiteManagementFolder)
zope.deferredimport.deprecatedFrom(
- "Moved to zope.location.interfaces. Importing from here will stop working in Zope 3.6",
- "zope.location.interfaces",
+ "Moved to zope.component.interfaces. Importing from here will stop working in Zope 3.6",
+ "zope.component.interfaces",
"ISite", "IPossibleSite")
-
Modified: zope.app.component/trunk/src/zope/app/component/site.py
===================================================================
--- zope.app.component/trunk/src/zope/app/component/site.py 2009-11-18 16:30:11 UTC (rev 105835)
+++ zope.app.component/trunk/src/zope/app/component/site.py 2009-11-18 16:31:50 UTC (rev 105836)
@@ -19,6 +19,7 @@
"""
# on the side of caution for backwards compatibility we
# import everything defined
+from zope.component.hooks import setSite
from zope.site.site import (SiteManagementFolder,
SMFolderFactory,
SiteManagerContainer,
@@ -27,7 +28,6 @@
LocalSiteManager,
threadSiteSubscriber,
clearThreadSiteSubscriber,
- setSite,
clearSite,
SiteManagerAdapter,
changeSiteConfigurationAfterMove) # BBB
More information about the checkins
mailing list