From 02ead7794791f2dabbdbad08d484936d05a8508e Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Wed, 20 Feb 2013 23:57:18 -0500 Subject: Remove various testing dependencies, which breaks some circular dependencies. --- CHANGES.txt | 13 +++-- setup.py | 4 +- src/zope/traversing/browser/configure.zcml | 21 ++++++--- src/zope/traversing/tests/ftesting.zcml | 28 +++++++---- src/zope/traversing/tests/test_vhosting.py | 76 +++++++++++++++++++++++------- 5 files changed, 100 insertions(+), 42 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 29c6894..88b87b6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,7 +5,12 @@ Changes 4.0.0dev (unreleased) --------------------- -- Nothing changed yet. +- Removed ``zope.pagetemplate`` testing dependency to break another circular + dependency. + +- Removed ``zope.browserpage`` (ZCML) dependency by using low-level directives. + +- Removed ``zope.site`` testing dependency. 4.0.0a1 (2013-02-20) @@ -41,8 +46,8 @@ Changes - When a ``__parent__`` attribute is available on an object, it is always used for absolute URL construction, and no ILocation adapter lookup is performed for it. This was the previous behavior but was - broken (around 3.5?) due to dependency refactoring. - + broken (around 3.5?) due to dependency refactoring. + If the object provides no ``__parent__`` then an ILocation adapter lookup will be performed. This will always succeed as zope.location provides a default LocationProxy for everything, but more specific @@ -221,7 +226,7 @@ Changes - Added a traverer for ++skin++ for XMLRPC skins (IXMLRPCSkinType). This also means that the normal ++skin++ namespace handler is only bound to - IBrowserRequest. + IBrowserRequest. - Resolved the dependency on zope.app.applicationcontrol by importing the application controller only if the package is available. diff --git a/setup.py b/setup.py index d840b29..bd19281 100644 --- a/setup.py +++ b/setup.py @@ -67,20 +67,18 @@ setup(name='zope.traversing', package_dir = {'': 'src'}, namespace_packages=['zope',], extras_require = dict(test=[ - 'ZODB', 'zope.annotation', 'zope.browserresource[zcml]>=3.12', 'zope.component[zcml]', 'zope.configuration', 'zope.container', - 'zope.pagetemplate', 'zope.security[zcml]>=3.8', + 'zope.tales', 'zope.testing', ]), install_requires=[ 'setuptools', 'six', - 'zope.browserpage', 'zope.component', 'zope.i18n', 'zope.i18nmessageid', diff --git a/src/zope/traversing/browser/configure.zcml b/src/zope/traversing/browser/configure.zcml index 9e6c0cc..197d0fe 100644 --- a/src/zope/traversing/browser/configure.zcml +++ b/src/zope/traversing/browser/configure.zcml @@ -3,7 +3,6 @@ xmlns:browser="http://namespaces.zope.org/browser"> - - - + + + + + + + + diff --git a/src/zope/traversing/tests/ftesting.zcml b/src/zope/traversing/tests/ftesting.zcml index a97174d..139a1e5 100644 --- a/src/zope/traversing/tests/ftesting.zcml +++ b/src/zope/traversing/tests/ftesting.zcml @@ -5,7 +5,6 @@ package="zope.traversing" > - @@ -18,24 +17,33 @@ - - + + + + - + + + + + ') + self.addPage('/pt', u'request/URL') self.verify('/pt', 'http://localhost/pt/index.html') self.verify('/++vh++/++/pt', 'http://localhost/pt/index.html') @@ -129,7 +169,7 @@ class TestVirtualHosting(unittest.TestCase): self.verify('/++vh++https:localhost:443/fake/folders/++/pt', 'https://localhost/fake/folders/pt/index.html') - self.addPage('/foo/bar/pt', u'') + self.addPage('/foo/bar/pt', u'request/URL') self.verify('/foo/bar/pt', 'http://localhost/foo/bar/pt/index.html') self.verify('/foo/bar/++vh++/++/pt', 'http://localhost/pt/index.html') @@ -147,7 +187,7 @@ class TestVirtualHosting(unittest.TestCase): 'https://localhost/bar/index.html') def test_absolute_url(self): - self.addPage('/pt', u'') + self.addPage('/pt', u'context/@@absolute_url') self.verify('/pt', 'http://localhost') self.verify('/++vh++/++/pt', 'http://localhost') @@ -157,7 +197,7 @@ class TestVirtualHosting(unittest.TestCase): 'https://localhost/fake/folders') self.addPage('/foo/bar/pt', - u'') + u'context/@@absolute_url') self.verify('/foo/bar/pt', 'http://localhost/foo/bar') self.verify('/foo/bar/++vh++/++/pt', 'http://localhost') @@ -169,7 +209,7 @@ class TestVirtualHosting(unittest.TestCase): def test_absolute_url_absolute_traverse(self): self.createObject('/foo/bar/obj', MyObj()) self.addPage('/foo/bar/pt', - u'') + u'container/obj/pt/@@absolute_url') self.verify('/foo/bar/pt', 'http://localhost/foo/bar/pt') self.verify('/foo/++vh++https:localhost:443/++/bar/pt', 'https://localhost/bar/pt') @@ -180,7 +220,7 @@ class TestVirtualHosting(unittest.TestCase): if Resource not in _checkers: defineChecker(Resource, NamesChecker(['__call__'])) self.addPage(u'/foo/bar/pt', - u'') + u'context/++resource++quux') self.verify(u'/foo/bar/pt', u'http://localhost/@@/quux') self.verify(u'/foo/++vh++https:localhost:443/fake/folders/++/bar/pt', u'https://localhost/fake/folders/@@/quux') @@ -207,8 +247,7 @@ class TestVirtualHosting(unittest.TestCase): transaction.commit() def addPage(self, path, content): - page = MyPageTemplate() - page.pt_edit(content, 'text/html') + page = MyTalesPage(content) self.createObject(path, page) def verify(self, path, content): @@ -254,6 +293,7 @@ class DummyPublication: view = queryMultiAdapter((ob, request), name=name) if view is None: from zope.publisher.interfaces import NotFound + import pdb; pdb.set_trace() raise NotFound(ob, name) return view else: -- cgit v1.2.1