[Checkins] SVN: zc.resourcelibrary/trunk/ - Import hooks functionality from zope.component after it was moved there from
Thomas Lotze
tl at gocept.com
Thu Nov 19 02:19:33 EST 2009
Log message for revision 105851:
- Import hooks functionality from zope.component after it was moved there from
zope.site. This lifts the dependency on zope.site.
- Removed an unused ISite import and thereby, the undeclared dependency on
zope.location.
Changed:
U zc.resourcelibrary/trunk/CHANGES.txt
U zc.resourcelibrary/trunk/setup.py
U zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py
U zc.resourcelibrary/trunk/src/zc/resourcelibrary/tests/tests.py
-=-
Modified: zc.resourcelibrary/trunk/CHANGES.txt
===================================================================
--- zc.resourcelibrary/trunk/CHANGES.txt 2009-11-19 07:05:29 UTC (rev 105850)
+++ zc.resourcelibrary/trunk/CHANGES.txt 2009-11-19 07:19:32 UTC (rev 105851)
@@ -5,9 +5,13 @@
1.3.1 (unreleased)
------------------
-- Nothing changed yet.
+- Import hooks functionality from zope.component after it was moved there from
+ zope.site. This lifts the dependency on zope.site.
+- Removed an unused ISite import and thereby, the undeclared dependency on
+ zope.location.
+
1.3.0 (2009-10-08)
------------------
Modified: zc.resourcelibrary/trunk/setup.py
===================================================================
--- zc.resourcelibrary/trunk/setup.py 2009-11-19 07:05:29 UTC (rev 105850)
+++ zc.resourcelibrary/trunk/setup.py 2009-11-19 07:19:32 UTC (rev 105851)
@@ -56,7 +56,6 @@
'zope.app.zcmlfiles',
'zope.pagetemplate',
'zope.securitypolicy',
- 'zope.site',
'zope.testbrowser',
'zope.testing',
]),
Modified: zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py
===================================================================
--- zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py 2009-11-19 07:05:29 UTC (rev 105850)
+++ zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py 2009-11-19 07:19:32 UTC (rev 105851)
@@ -18,14 +18,13 @@
from zope.app.publication.interfaces import IBrowserRequestFactory
from zope.browserresource.resource import Resource
from zope.component import queryMultiAdapter, getMultiAdapter, getSiteManager
-from zope.location.interfaces import ISite
from zope.publisher.browser import BrowserRequest, BrowserResponse
from zope.publisher.browser import isHTML
from zope.publisher.interfaces.browser import IBrowserPublisher
-from zope.site.hooks import getSite
from zope.traversing.browser.interfaces import IAbsoluteURL
import zc.resourcelibrary
+import zope.component.hooks
class Request(BrowserRequest):
@@ -100,7 +99,7 @@
def _generateIncludes(self, libraries):
# generate the HTML that will be included in the response
- site = getSite()
+ site = zope.component.hooks.getSite()
if site is None:
return
Modified: zc.resourcelibrary/trunk/src/zc/resourcelibrary/tests/tests.py
===================================================================
--- zc.resourcelibrary/trunk/src/zc/resourcelibrary/tests/tests.py 2009-11-19 07:05:29 UTC (rev 105850)
+++ zc.resourcelibrary/trunk/src/zc/resourcelibrary/tests/tests.py 2009-11-19 07:19:32 UTC (rev 105851)
@@ -18,9 +18,7 @@
from zc.resourcelibrary import publication
from zc.resourcelibrary import tal
from zope.app.testing import functional
-from zope.site.hooks import getSite
from zope.configuration import xmlconfig
-from zope.site.hooks import setSite
import zope.interface
from zope.pagetemplate import pagetemplate
import zope.publisher.interfaces.browser
@@ -28,6 +26,7 @@
import doctest
import os
import unittest
+import zope.component.hooks
import zope.security.management
@@ -80,8 +79,8 @@
zope.security.management.newInteraction(request)
# if no set has been set, try setting it the view context
- if getSite() is None and hasattr(view, 'context'):
- setSite(view.context)
+ if zope.component.hooks.getSite() is None and hasattr(view, 'context'):
+ zope.component.hooks.setSite(view.context)
pt = TestPageTemplate(view)
More information about the checkins
mailing list