diff options
author | Marien Zwart <marienz@gentoo.org> | 2006-02-13 22:23:54 +0000 |
---|---|---|
committer | Marien Zwart <marienz@gentoo.org> | 2006-02-13 22:23:54 +0000 |
commit | 95aee9d038669c78b64db6093692ce90ac7537a9 (patch) | |
tree | 120d57f873db1bb3f8f96c6ee74c97a461b2ac4a /dev-python/twisted-web | |
parent | Dropping dependency on gnome-extra/medusa as it is masked and unneccessary (diff) | |
download | historical-95aee9d038669c78b64db6093692ce90ac7537a9.tar.gz historical-95aee9d038669c78b64db6093692ce90ac7537a9.tar.bz2 historical-95aee9d038669c78b64db6093692ce90ac7537a9.zip |
Patch to make the tests succeed with twisted 2.0, 2.1 and 2.2. No revision bump because this only affects the tests.
Package-Manager: portage-2660-svn
Diffstat (limited to 'dev-python/twisted-web')
-rw-r--r-- | dev-python/twisted-web/ChangeLog | 8 | ||||
-rw-r--r-- | dev-python/twisted-web/Manifest | 23 | ||||
-rw-r--r-- | dev-python/twisted-web/files/twisted-web-0.5.0-tests-2.2-compat.patch | 100 | ||||
-rw-r--r-- | dev-python/twisted-web/twisted-web-0.5.0-r1.ebuild | 10 |
4 files changed, 128 insertions, 13 deletions
diff --git a/dev-python/twisted-web/ChangeLog b/dev-python/twisted-web/ChangeLog index dab748a36c28..7e436d7a2f44 100644 --- a/dev-python/twisted-web/ChangeLog +++ b/dev-python/twisted-web/ChangeLog @@ -1,6 +1,12 @@ # 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.6 2006/02/01 13:42:25 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/twisted-web/ChangeLog,v 1.7 2006/02/13 22:23:54 marienz Exp $ + + 13 Feb 2006; Marien Zwart <marienz@gentoo.org> + +files/twisted-web-0.5.0-tests-2.2-compat.patch, + twisted-web-0.5.0-r1.ebuild: + Patch to make the tests succeed with twisted 2.0, 2.1 and 2.2. No revision + bump because this only affects the tests. 01 Feb 2006; Aron Griffis <agriffis@gentoo.org> twisted-web-0.5.0-r1.ebuild: diff --git a/dev-python/twisted-web/Manifest b/dev-python/twisted-web/Manifest index e3c4823b3578..ba717dfcf5c6 100644 --- a/dev-python/twisted-web/Manifest +++ b/dev-python/twisted-web/Manifest @@ -1,22 +1,25 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 104acef827de697f6f5564981fbf18fb ChangeLog 943 -RMD160 1ff00a6e0fff1e323e15e1467a0e67e41bf37b89 ChangeLog 943 -SHA256 ca7c360a4620e86ec4ca725c7fc5695442eda05f9efb1abfa27b966eaeb07fc0 ChangeLog 943 +MD5 fe7e3cc73a315d021e15f796c89e3d88 ChangeLog 1195 +RMD160 68f52afa8427f9bd1e079640330c3d8ca6a3579b ChangeLog 1195 +SHA256 ca6c3eb95db1bbb9a67d3f1b9841714024dbfbcdaaed6ab1d8b2bc1b36f504f6 ChangeLog 1195 MD5 57f23e26014f9e6ff7598d3835af2f22 files/digest-twisted-web-0.5.0-r1 253 RMD160 d2ee02a02a49de6adf9a55491a398c2dd7b769bb files/digest-twisted-web-0.5.0-r1 253 SHA256 8092e2fabf7c7a484d5a071341a19a3c523e4e534399bac66f6ab8731cd0b22a files/digest-twisted-web-0.5.0-r1 253 +MD5 0d086fde8bb2de73d9d4c6b50d936f19 files/twisted-web-0.5.0-tests-2.2-compat.patch 4006 +RMD160 23b068ebde8fc096117b6beff15ddf2b559eb320 files/twisted-web-0.5.0-tests-2.2-compat.patch 4006 +SHA256 b0bd817232f37eba306a86fe0463cf509e94b8a37c7a032ebbfd0b59b8f7a24d files/twisted-web-0.5.0-tests-2.2-compat.patch 4006 MD5 bc29fb845d6836abeba3eeff41da8476 metadata.xml 218 RMD160 0daf1f824cd7035b959dfc437279171ce5f1075b metadata.xml 218 SHA256 1ac3509e75b2cc8bf394a0c7e068039cc0152de1feae40a64b401365c9db67b2 metadata.xml 218 -MD5 99ce0f12eec622cd5251b54cc6e58d69 twisted-web-0.5.0-r1.ebuild 411 -RMD160 e0250048de6fb802e47daf4085a172028a0581d6 twisted-web-0.5.0-r1.ebuild 411 -SHA256 111d8aee95d14d8a34e7d25df684e48fc6f1f75f685278a662db3351e91d4efb twisted-web-0.5.0-r1.ebuild 411 +MD5 6181f3cd5ceb552e4bbc63f347c97fa1 twisted-web-0.5.0-r1.ebuild 509 +RMD160 fe85d49ea81d5cb324cb46e43d83ca5667fc9b29 twisted-web-0.5.0-r1.ebuild 509 +SHA256 78f0cccaab27df4138ce97f0cffee297981641d20eb613a8273176b882149742 twisted-web-0.5.0-r1.ebuild 509 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.1 (GNU/Linux) +Version: GnuPG v1.4.2 (GNU/Linux) -iD8DBQFD4+YMJrHF4yAQTrARAkmKAKCapagvubFtIkOJ6vc2n6TxfwYmEwCfaJ0j -u1KQvsufVcdd6mZxeqSBE9I= -=jT5w +iD8DBQFD8QcLW78445TWHXcRAjGNAJ9wkRmblB9W461Ovv4Yj5zLg9fPnQCeItnG +YyQmWMKzO3hoFCW8RyNYCxw= +=9N4f -----END PGP SIGNATURE----- diff --git a/dev-python/twisted-web/files/twisted-web-0.5.0-tests-2.2-compat.patch b/dev-python/twisted-web/files/twisted-web-0.5.0-tests-2.2-compat.patch new file mode 100644 index 000000000000..2a8f78b38cc1 --- /dev/null +++ b/dev-python/twisted-web/files/twisted-web-0.5.0-tests-2.2-compat.patch @@ -0,0 +1,100 @@ +=== modified file 'twisted/web/test/test_webclient.py' +--- twisted/web/test/test_webclient.py ++++ twisted/web/test/test_webclient.py +@@ -94,15 +94,12 @@ + r.putChild("broken", BrokenDownloadResource()) + site = server.Site(r, timeout=None) + self.port = self._listen(site) +- reactor.iterate(); reactor.iterate() + self.portno = self.port.getHost().port + + def tearDown(self): + if serverCallID and serverCallID.active(): + serverCallID.cancel() +- self.port.stopListening() +- reactor.iterate(); reactor.iterate(); +- del self.port ++ return self.port.stopListening() + + def getURL(self, path): + return "http://127.0.0.1:%d/%s" % (self.portno, path) +@@ -115,9 +112,10 @@ + + def testBrokenDownload(self): + # test what happens when download gets disconnected in the middle +- exc = self.assertRaises(client.PartialDownloadError, unittest.wait, +- client.getPage(self.getURL("broken"))) +- self.assertEquals(exc.response, "abc") ++ d = client.getPage(self.getURL("broken")) ++ d = unittest.assertFailure(d, client.PartialDownloadError) ++ d.addCallback(lambda exc: self.assertEquals(exc.response, "abc")) ++ return d + + def testHostHeader(self): + # if we pass Host header explicitly, it should be used, otherwise +@@ -132,7 +130,8 @@ + def testTimeoutNotTriggering(self): + # Test that when the timeout doesn't trigger, things work as expected. + d = client.getPage(self.getURL("wait"), timeout=100) +- self.assertEquals(unittest.wait(d), "hello!!!") ++ d.addCallback(self.assertEquals, "hello!!!") ++ return d + + def testTimeoutTriggering(self): + # Test that when the timeout does trigger, we get a defer.TimeoutError. +@@ -195,10 +194,14 @@ + return ignored + + def _downloadTest(self, method): ++ dl = [] + for (url, code) in [("nosuchfile", "404"), ("error", "401"), + ("error?showlength=1", "401")]: +- exc = self.assertRaises(error.Error, unittest.wait, method(url)) +- self.assertEquals(exc.args[0], code) ++ d = method(url) ++ d = unittest.assertFailure(d, error.Error) ++ d.addCallback(lambda exc, code=code: self.assertEquals(exc.args[0], code)) ++ dl.append(d) ++ return defer.DeferredList(dl, fireOnOneErrback=True) + + def testServerError(self): + return self._downloadTest(lambda url: client.getPage(self.getURL(url))) +@@ -305,7 +308,6 @@ + interface="127.0.0.1") + self.plainPort = reactor.listenTCP(0, plainSite, interface="127.0.0.1") + +- reactor.iterate(); reactor.iterate() + self.plainPortno = self.plainPort.getHost().port + self.tlsPortno = self.tlsPort.getHost().port + +@@ -315,11 +317,9 @@ + tlsRoot.putChild('four', static.Data('FOUND IT!', 'text/plain')) + + def tearDown(self): +- self.plainPort.stopListening() +- self.tlsPort.stopListening() +- reactor.iterate(); reactor.iterate(); +- del self.plainPort +- del self.tlsPort ++ ds = map(defer.maybeDeferred, ++ [self.plainPort.stopListening, self.tlsPort.stopListening]) ++ return defer.gatherResults(ds) + + def testHoppingAround(self): + return client.getPage(self.getHTTP("one") +@@ -343,13 +343,10 @@ + root.putChild("rawcookiemirror", RawCookieMirrorResource()) + site = server.Site(root, timeout=None) + self.port = self._listen(site) +- reactor.iterate(); reactor.iterate() + self.portno = self.port.getHost().port + + def tearDown(self): +- self.port.stopListening() +- reactor.iterate(); reactor.iterate(); +- del self.port ++ return self.port.stopListening() + + def getHTTP(self, path): + return "http://127.0.0.1:%d/%s" % (self.portno, path) + diff --git a/dev-python/twisted-web/twisted-web-0.5.0-r1.ebuild b/dev-python/twisted-web/twisted-web-0.5.0-r1.ebuild index d228cc68e023..d73ed883ce50 100644 --- a/dev-python/twisted-web/twisted-web-0.5.0-r1.ebuild +++ b/dev-python/twisted-web/twisted-web-0.5.0-r1.ebuild @@ -1,13 +1,19 @@ # 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-r1.ebuild,v 1.3 2006/02/01 13:42:25 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/twisted-web/twisted-web-0.5.0-r1.ebuild,v 1.4 2006/02/13 22:23:54 marienz Exp $ MY_PACKAGE=Web -inherit twisted +inherit twisted eutils DESCRIPTION="Twisted web server, programmable in Python" KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sh ~sparc ~x86" DEPEND=">=dev-python/twisted-2" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/${P}-tests-2.2-compat.patch" +} |