[Checkins] SVN: zope.site/trunk/s backed out changes concerning the getParent cleanup which got its feature branch

Thomas Lotze tl at gocept.com
Wed Sep 23 13:47:44 EDT 2009


Log message for revision 104460:
  backed out changes concerning the getParent cleanup which got its feature branch

Changed:
  U   zope.site/trunk/setup.py
  U   zope.site/trunk/src/zope/site/site.py
  U   zope.site/trunk/src/zope/site/site.txt
  U   zope.site/trunk/src/zope/site/tests/test_site.py

-=-
Modified: zope.site/trunk/setup.py
===================================================================
--- zope.site/trunk/setup.py	2009-09-23 17:45:26 UTC (rev 104459)
+++ zope.site/trunk/setup.py	2009-09-23 17:47:44 UTC (rev 104460)
@@ -57,7 +57,6 @@
       namespace_packages=['zope'],
       extras_require=dict(
           test=['zope.app.testing',
-                'zope.configuration',
                 'zope.copypastemove']),
       install_requires=[
           'setuptools',
@@ -65,10 +64,12 @@
           'zope.container',
           'zope.security',
           'zope.component>=3.6.0',
+          'zope.configuration',
           'zope.event',
           'zope.interface',
           'zope.lifecycleevent',
-          'zope.location>3.6.0',
+          'zope.location>3.4.0b1',
+          'zope.traversing',
           ],
       include_package_data = True,
       zip_safe = False,

Modified: zope.site/trunk/src/zope/site/site.py
===================================================================
--- zope.site/trunk/src/zope/site/site.py	2009-09-23 17:45:26 UTC (rev 104459)
+++ zope.site/trunk/src/zope/site/site.py	2009-09-23 17:47:44 UTC (rev 104460)
@@ -30,6 +30,7 @@
 import zope.component
 import zope.component.persistentregistry
 import zope.component.interfaces
+import zope.traversing.api
 import zope.location
 import zope.location.interfaces
 
@@ -95,7 +96,7 @@
             return None
 
         try:
-            site = zope.location.interfaces.ILocationInfo(site).getParent()
+            site = zope.traversing.api.getParent(site)
         except TypeError:
             # there was not enough context; probably run from a test
             return None

Modified: zope.site/trunk/src/zope/site/site.txt
===================================================================
--- zope.site/trunk/src/zope/site/site.txt	2009-09-23 17:45:26 UTC (rev 104459)
+++ zope.site/trunk/src/zope/site/site.txt	2009-09-23 17:47:44 UTC (rev 104460)
@@ -239,17 +239,6 @@
 really become interesting, once we have multiple sites. We can override other
 local configuration.
 
-This behaviour uses the notion of location, therefore we need to configure the
-zope.location package first:
-
-  >>> import zope.configuration.xmlconfig
-  >>> _  = zope.configuration.xmlconfig.string("""
-  ... <configure xmlns="http://namespaces.zope.org/zope">
-  ...   <include package="zope.component" file="meta.zcml"/>
-  ...   <include package="zope.location" />
-  ... </configure>
-  ... """)
-
 Let's now create a new folder called `folder11`, add it to `myfolder` and make
 it a site:
 

Modified: zope.site/trunk/src/zope/site/tests/test_site.py
===================================================================
--- zope.site/trunk/src/zope/site/tests/test_site.py	2009-09-23 17:45:26 UTC (rev 104459)
+++ zope.site/trunk/src/zope/site/tests/test_site.py	2009-09-23 17:47:44 UTC (rev 104460)
@@ -158,24 +158,11 @@
 def tearDown(test):
     testing.siteTearDown()
 
-
-class Layer(object):
-
-    @staticmethod
-    def setUp():
-        pass
-
-
 def test_suite():
-    site_suite = doctest.DocFileSuite('../site.txt',
-                                       setUp=setUp, tearDown=tearDown)
-    # XXX Isolate the site.txt tests within their own layer as they do some
-    # component registration.
-    site_suite.layer = Layer
-
     return unittest.TestSuite((
         doctest.DocTestSuite(),
         unittest.makeSuite(SiteManagerContainerTest),
-        site_suite,
+        doctest.DocFileSuite('../site.txt',
+                             setUp=setUp, tearDown=tearDown),
         ))
     



More information about the checkins mailing list