[Checkins] SVN: zope.fanstatic/trunk/ Update to base_url changes in fanstatic 'trunk'.

Jan-Jaap Driessen jdriessen at thehealthagency.com
Fri Feb 18 09:01:54 EST 2011


Log message for revision 120421:
  Update to base_url changes in fanstatic 'trunk'.

Changed:
  U   zope.fanstatic/trunk/buildout.cfg
  U   zope.fanstatic/trunk/setup.py
  U   zope.fanstatic/trunk/src/zope/fanstatic/zopesupport.py

-=-
Modified: zope.fanstatic/trunk/buildout.cfg
===================================================================
--- zope.fanstatic/trunk/buildout.cfg	2011-02-18 13:12:52 UTC (rev 120420)
+++ zope.fanstatic/trunk/buildout.cfg	2011-02-18 14:01:54 UTC (rev 120421)
@@ -1,13 +1,17 @@
 [buildout]
 extends =
-  http://download.zope.org/zopetoolkit/index/1.1c1/ztk-versions.cfg
-  http://download.zope.org/zopetoolkit/index/1.1c1/zopeapp-versions.cfg
+  http://download.zope.org/zopetoolkit/index/1.1/ztk-versions.cfg
+  http://download.zope.org/zopetoolkit/index/1.1/zopeapp-versions.cfg
 develop = .
 parts = test
 versions = versions
 allow-picked-versions = false
 extensions = mr.developer
+auto-checkout = fanstatic
 
+[sources]
+fanstatic = hg http://bitbucket.org/fanstatic/fanstatic
+
 [versions]
 fanstatic = 0.10
 WebOb = 1.0

Modified: zope.fanstatic/trunk/setup.py
===================================================================
--- zope.fanstatic/trunk/setup.py	2011-02-18 13:12:52 UTC (rev 120420)
+++ zope.fanstatic/trunk/setup.py	2011-02-18 14:01:54 UTC (rev 120421)
@@ -31,7 +31,7 @@
     zip_safe=False,
     install_requires=[
         'setuptools',
-        'fanstatic',
+        'fanstatic > 0.10.1',
         'zope.component',
         'zope.errorview [browser]',
         'zope.event',

Modified: zope.fanstatic/trunk/src/zope/fanstatic/zopesupport.py
===================================================================
--- zope.fanstatic/trunk/src/zope/fanstatic/zopesupport.py	2011-02-18 13:12:52 UTC (rev 120420)
+++ zope.fanstatic/trunk/src/zope/fanstatic/zopesupport.py	2011-02-18 14:01:54 UTC (rev 120421)
@@ -34,7 +34,7 @@
     if not needed.has_resources():
         # Do nothing if there're no resources needed at all.
         return
-    if needed.base_url is None:
+    if not needed.has_base_url():
         # Only set the base_url if it has not been set just yet.
         #
         # Note that the given context is set to None, resulting in
@@ -47,7 +47,7 @@
         # is cleared). Since fanstatic resource "registrations" cannot
         # be overridden on a per ISite basis anyway, this is good
         # enough.
-        needed.base_url = absoluteURL(None, event.request)
+        needed.set_base_url(absoluteURL(None, event.request))
 
 @adapter(IHandleExceptionEvent)
 def clear_needed_resources(event):
@@ -91,8 +91,8 @@
 
     def __str__(self):
         needed = fanstatic.get_needed()
-        if needed.base_url is None:
-            needed.base_url = absoluteURL(None, self.request)
+        if not needed.has_base_url():
+            needed.set_base_url(absoluteURL(None, self.request))
         return needed.library_url(self.library) + self.name
 
     __call__ = __str__



More information about the checkins mailing list