summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/twisted-web')
-rw-r--r--dev-python/twisted-web/ChangeLog12
-rw-r--r--dev-python/twisted-web/Manifest10
-rw-r--r--dev-python/twisted-web/files/digest-twisted-web-0.5.0-r23
-rw-r--r--dev-python/twisted-web/files/twisted-web-0.5.0-tests-2.2-compat-14780.patch109
-rw-r--r--dev-python/twisted-web/files/twisted-web-0.5.0-tests-2.2-compat-14782.patch39
-rw-r--r--dev-python/twisted-web/files/twisted-web-0.5.0-tests-2.2-compat-14786.patch59
-rw-r--r--dev-python/twisted-web/twisted-web-0.5.0-r2.ebuild22
7 files changed, 253 insertions, 1 deletions
diff --git a/dev-python/twisted-web/ChangeLog b/dev-python/twisted-web/ChangeLog
index de39a66513b2..0d3b6980b21b 100644
--- a/dev-python/twisted-web/ChangeLog
+++ b/dev-python/twisted-web/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for dev-python/twisted-web
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/twisted-web/ChangeLog,v 1.8 2006/04/03 21:44:57 gustavoz Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/twisted-web/ChangeLog,v 1.9 2006/04/09 22:53:15 marienz Exp $
+
+*twisted-web-0.5.0-r2 (09 Apr 2006)
+
+ 09 Apr 2006; Marien Zwart <marienz@gentoo.org>
+ +files/twisted-web-0.5.0-tests-2.2-compat-14780.patch,
+ +files/twisted-web-0.5.0-tests-2.2-compat-14782.patch,
+ +files/twisted-web-0.5.0-tests-2.2-compat-14786.patch,
+ +twisted-web-0.5.0-r2.ebuild:
+ Revision bump with patches to pass the tests with twisted-2.2.0. Test
+ changes only. See bug #128688. Thanks to nixnut for noticing.
03 Apr 2006; Gustavo Zacarias <gustavoz@gentoo.org>
twisted-web-0.5.0-r1.ebuild:
diff --git a/dev-python/twisted-web/Manifest b/dev-python/twisted-web/Manifest
index 1202ad4b2f9a..c5e4fca58772 100644
--- a/dev-python/twisted-web/Manifest
+++ b/dev-python/twisted-web/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
MD5 21bc9842e81accf19fa6f096534ba0d5 ChangeLog 1737
RMD160 8da5364036617f8fe9f785bab8fa46d655878cd9 ChangeLog 1737
SHA256 3f2d8769edd6f5d3b8f48090d7891b9e69ab414e30f68f82c4977f55d1aa4f5f ChangeLog 1737
@@ -28,3 +31,10 @@ SHA256 b610ae43a4f08b23732a25af9b0b4747355734900bfe4ba047c8e87436a9b8c1 twisted-
MD5 0581df1f70f8d1fda19b20410d90b083 twisted-web-0.5.0-r2.ebuild 679
RMD160 83ec729440dcf583fb720d02a5e57387476e0a2e twisted-web-0.5.0-r2.ebuild 679
SHA256 058da5ea8d8ee964f7a82419da474b490b936f2c07366939303b483fe97f3c40 twisted-web-0.5.0-r2.ebuild 679
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.2.2 (GNU/Linux)
+
+iD8DBQFEOZBmW78445TWHXcRAnNrAKCOOD+JFT7z6DSwhCrl2DHC4aqFbQCfdTAV
+xcaLQuVb2e2ALQ1EVOOKHhk=
+=KeVu
+-----END PGP SIGNATURE-----
diff --git a/dev-python/twisted-web/files/digest-twisted-web-0.5.0-r2 b/dev-python/twisted-web/files/digest-twisted-web-0.5.0-r2
new file mode 100644
index 000000000000..58850c744dfb
--- /dev/null
+++ b/dev-python/twisted-web/files/digest-twisted-web-0.5.0-r2
@@ -0,0 +1,3 @@
+MD5 287b9402ca99d05e6d3be99413317633 TwistedWeb-0.5.0.tar.bz2 263139
+RMD160 61829c8ae492c7cf3f43f45c70a5653584e50378 TwistedWeb-0.5.0.tar.bz2 263139
+SHA256 7d33de4924c0f7819b3ba9980461ca2bf7b8f5619f21f90755c29255570b599e TwistedWeb-0.5.0.tar.bz2 263139
diff --git a/dev-python/twisted-web/files/twisted-web-0.5.0-tests-2.2-compat-14780.patch b/dev-python/twisted-web/files/twisted-web-0.5.0-tests-2.2-compat-14780.patch
new file mode 100644
index 000000000000..3c5a36d4fcc3
--- /dev/null
+++ b/dev-python/twisted-web/files/twisted-web-0.5.0-tests-2.2-compat-14780.patch
@@ -0,0 +1,109 @@
+Index: twisted/web/test/test_xmlrpc.py
+===================================================================
+--- twisted/web/test/test_xmlrpc.py (revision 14779)
++++ twisted/web/test/test_xmlrpc.py (revision 14780)
+@@ -96,18 +96,20 @@
+ return xmlrpc.Proxy("http://127.0.0.1:%d/" % self.port)
+
+ def testResults(self):
+- x = self.proxy().callRemote("add", 2, 3)
+- self.assertEquals(unittest.deferredResult(x), 5)
+- x = self.proxy().callRemote("defer", "a")
+- self.assertEquals(unittest.deferredResult(x), "a")
+- x = self.proxy().callRemote("dict", {"a" : 1}, "a")
+- self.assertEquals(unittest.deferredResult(x), 1)
+- x = self.proxy().callRemote("pair", 'a', 1)
+- self.assertEquals(unittest.deferredResult(x), ['a', 1])
+- x = self.proxy().callRemote("complex")
+- self.assertEquals(unittest.deferredResult(x),
+- {"a": ["b", "c", 12, []], "D": "foo"})
++ inputOutput = [
++ ("add", (2, 3), 5),
++ ("defer", ("a",), "a"),
++ ("dict", ({"a": 1}, "a"), 1),
++ ("pair", ("a", 1), ["a", 1]),
++ ("complex", (), {"a": ["b", "c", 12, []], "D": "foo"})]
+
++ dl = []
++ for meth, args, outp in inputOutput:
++ d = self.proxy().callRemote(meth, *args)
++ d.addCallback(self.assertEquals, outp)
++ dl.append(d)
++ return defer.DeferredList(dl)
++
+ def testErrors(self):
+ for code, methodName in [(666, "fail"), (666, "deferFail"),
+ (12, "fault"), (23, "noSuchMethod"),
+@@ -140,38 +142,44 @@
+ self.port = self.p.getHost().port
+
+ def testListMethods(self):
++
++ def cbMethods(meths):
++ meths.sort()
++ self.failUnlessEqual(
++ meths,
++ ['add', 'complex', 'defer', 'deferFail',
++ 'deferFault', 'dict', 'fail', 'fault',
++ 'pair', 'system.listMethods',
++ 'system.methodHelp',
++ 'system.methodSignature'])
++
+ d = self.proxy().callRemote("system.listMethods")
+- list = unittest.deferredResult(d)
+- list.sort()
+- self.failUnlessEqual(list, ['add', 'complex', 'defer', 'deferFail',
+- 'deferFault', 'dict', 'fail', 'fault',
+- 'pair', 'system.listMethods',
+- 'system.methodHelp',
+- 'system.methodSignature'])
++ d.addCallback(cbMethods)
++ return d
+
+ def testMethodHelp(self):
+- d = self.proxy().callRemote("system.methodHelp", 'defer')
+- help = unittest.deferredResult(d)
+- self.failUnlessEqual(help, 'Help for defer.')
++ inputOutputs = [
++ ("defer", "Help for defer."),
++ ("fail", ""),
++ ("dict", "Help for dict.")]
+
+- d = self.proxy().callRemote("system.methodHelp", 'fail')
+- help = unittest.deferredResult(d)
+- self.failUnlessEqual(help, '')
++ dl = []
++ for meth, expected in inputOutputs:
++ d = self.proxy().callRemote("system.methodHelp", meth)
++ d.addCallback(self.assertEquals, expected)
++ dl.append(d)
++ return defer.DeferredList(dl)
+
+- d = self.proxy().callRemote("system.methodHelp", 'dict')
+- help = unittest.deferredResult(d)
+- self.failUnlessEqual(help, 'Help for dict.')
+-
+ def testMethodSignature(self):
+- d = self.proxy().callRemote("system.methodSignature", 'defer')
+- sig = unittest.deferredResult(d)
+- self.failUnlessEqual(sig, '')
++ inputOutputs = [
++ ("defer", ""),
++ ("add", [['int', 'int', 'int'],
++ ['double', 'double', 'double']]),
++ ("pair", [['array', 'string', 'int']])]
+
+- d = self.proxy().callRemote("system.methodSignature", 'add')
+- sig = unittest.deferredResult(d)
+- self.failUnlessEqual(sig, [['int', 'int', 'int'],
+- ['double', 'double', 'double']])
+-
+- d = self.proxy().callRemote("system.methodSignature", 'pair')
+- sig = unittest.deferredResult(d)
+- self.failUnlessEqual(sig, [['array', 'string', 'int']])
++ dl = []
++ for meth, expected in inputOutputs:
++ d = self.proxy().callRemote("system.methodSignature", meth)
++ d.addCallback(self.assertEquals, expected)
++ dl.append(d)
++ return defer.DeferredList(dl)
diff --git a/dev-python/twisted-web/files/twisted-web-0.5.0-tests-2.2-compat-14782.patch b/dev-python/twisted-web/files/twisted-web-0.5.0-tests-2.2-compat-14782.patch
new file mode 100644
index 000000000000..4c19296e5f3b
--- /dev/null
+++ b/dev-python/twisted-web/files/twisted-web-0.5.0-tests-2.2-compat-14782.patch
@@ -0,0 +1,39 @@
+Index: twisted/web/test/test_xmlrpc.py
+===================================================================
+--- twisted/web/test/test_xmlrpc.py (revision 14781)
++++ twisted/web/test/test_xmlrpc.py (revision 14782)
+@@ -88,9 +88,7 @@
+ self.port = self.p.getHost().port
+
+ def tearDown(self):
+- self.p.stopListening()
+- reactor.iterate()
+- reactor.iterate()
++ return self.p.stopListening()
+
+ def proxy(self):
+ return xmlrpc.Proxy("http://127.0.0.1:%d/" % self.port)
+@@ -108,7 +106,7 @@
+ d = self.proxy().callRemote(meth, *args)
+ d.addCallback(self.assertEquals, outp)
+ dl.append(d)
+- return defer.DeferredList(dl)
++ return defer.DeferredList(dl, fireOnOneErrback=True)
+
+ def testErrors(self):
+ for code, methodName in [(666, "fail"), (666, "deferFail"),
+@@ -168,7 +166,7 @@
+ d = self.proxy().callRemote("system.methodHelp", meth)
+ d.addCallback(self.assertEquals, expected)
+ dl.append(d)
+- return defer.DeferredList(dl)
++ return defer.DeferredList(dl, fireOnOneErrback=True)
+
+ def testMethodSignature(self):
+ inputOutputs = [
+@@ -182,4 +180,4 @@
+ d = self.proxy().callRemote("system.methodSignature", meth)
+ d.addCallback(self.assertEquals, expected)
+ dl.append(d)
+- return defer.DeferredList(dl)
++ return defer.DeferredList(dl, fireOnOneErrback=True)
diff --git a/dev-python/twisted-web/files/twisted-web-0.5.0-tests-2.2-compat-14786.patch b/dev-python/twisted-web/files/twisted-web-0.5.0-tests-2.2-compat-14786.patch
new file mode 100644
index 000000000000..c3da66ff722d
--- /dev/null
+++ b/dev-python/twisted-web/files/twisted-web-0.5.0-tests-2.2-compat-14786.patch
@@ -0,0 +1,59 @@
+Index: twisted/web/test/test_xmlrpc.py
+===================================================================
+--- twisted/web/test/test_xmlrpc.py (revision 14785)
++++ twisted/web/test/test_xmlrpc.py (revision 14786)
+@@ -23,6 +23,12 @@
+
+ import time
+
++class TestRuntimeError(RuntimeError):
++ pass
++
++class TestValueError(ValueError):
++ pass
++
+ class Test(XMLRPC):
+
+ FAILURE = 666
+@@ -50,11 +56,11 @@
+ return defer.succeed(x)
+
+ def xmlrpc_deferFail(self):
+- return defer.fail(ValueError())
++ return defer.fail(TestValueError())
+
+ # don't add a doc string, it's part of the test
+ def xmlrpc_fail(self):
+- raise RuntimeError
++ raise TestRuntimeError
+
+ def xmlrpc_fault(self):
+ return xmlrpc.Fault(12, "hello")
+@@ -109,19 +115,17 @@
+ return defer.DeferredList(dl, fireOnOneErrback=True)
+
+ def testErrors(self):
++ dl = []
+ for code, methodName in [(666, "fail"), (666, "deferFail"),
+ (12, "fault"), (23, "noSuchMethod"),
+ (17, "deferFault"), (42, "SESSION_TEST")]:
+- l = []
+- d = self.proxy().callRemote(methodName).addErrback(l.append)
+- timeout = time.time() + 10
+- while not l and time.time() < timeout:
+- reactor.iterate(0.01)
+- if not l:
+- self.fail("timeout")
+- l[0].trap(xmlrpc.Fault)
+- self.assertEquals(l[0].value.faultCode, code)
+- log.flushErrors(RuntimeError, ValueError)
++ d = self.proxy().callRemote(methodName)
++ d = self.assertFailure(d, xmlrpc.Fault)
++ d.addCallback(lambda exc, code=code: self.assertEquals(exc.faultCode, code))
++ dl.append(d)
++ d = defer.DeferredList(dl, fireOnOneErrback=True)
++ d.addCallback(lambda ign: log.flushErrors(TestRuntimeError, TestValueError))
++ return d
+
+
+ class XMLRPCTestCase2(XMLRPCTestCase):
diff --git a/dev-python/twisted-web/twisted-web-0.5.0-r2.ebuild b/dev-python/twisted-web/twisted-web-0.5.0-r2.ebuild
new file mode 100644
index 000000000000..2aa24164a0df
--- /dev/null
+++ b/dev-python/twisted-web/twisted-web-0.5.0-r2.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/twisted-web/twisted-web-0.5.0-r2.ebuild,v 1.1 2006/04/09 22:53:15 marienz Exp $
+
+MY_PACKAGE=Web
+
+inherit twisted eutils
+
+DESCRIPTION="Twisted web server, programmable in Python"
+
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sh ~sparc ~x86"
+
+DEPEND=">=dev-python/twisted-2.2"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-tests-2.2-compat-14780.patch"
+ epatch "${FILESDIR}/${P}-tests-2.2-compat-14782.patch"
+ epatch "${FILESDIR}/${P}-tests-2.2-compat-14786.patch"
+ epatch "${FILESDIR}/${P}-tests-2.2-compat.patch"
+}