From: Marien Zwart Date: Thu, 11 Jan 2007 22:12:07 +0000 (+0000) Subject: Version bump, drop revision patched to work with python 2.5 (use the new bump instead). X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ce72c8b2cd390f79778a984084dfdce2a0047876;p=gentoo.git Version bump, drop revision patched to work with python 2.5 (use the new bump instead). Package-Manager: portage-2.1.2_rc4-r8 --- diff --git a/dev-python/twisted/Manifest b/dev-python/twisted/Manifest index 984c242168bc..12d1179d43ce 100644 --- a/dev-python/twisted/Manifest +++ b/dev-python/twisted/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX twistd.conf 277 RMD160 c959b879d6f7358b647c71c3b514a4a6c8a49eef SHA1 661269a3ce6ed02f03d4fce07757e77420fd44c4 SHA256 aa2ffa5b128973bc0c58a1251b8bbb56f6f890728bc902805ea2db7606416119 MD5 7ec438488427334851e2eb977e4d8073 files/twistd.conf 277 RMD160 c959b879d6f7358b647c71c3b514a4a6c8a49eef files/twistd.conf 277 @@ -26,31 +29,12 @@ AUX twisted-2.1.0-zsh-head.patch 592 RMD160 1fc8e7f8de64055e3801b442b4f666aef567 MD5 1dea79601dae42090b4d8f34ecfc62a7 files/twisted-2.1.0-zsh-head.patch 592 RMD160 1fc8e7f8de64055e3801b442b4f666aef567ac71 files/twisted-2.1.0-zsh-head.patch 592 SHA256 c9b8a994685159f21a3b0512eed1144876453db09f8d6843529dc0ef8d886029 files/twisted-2.1.0-zsh-head.patch 592 -AUX twisted-2.4.0-python-2.5-compat.patch 16764 RMD160 1422984dd5f1503b27780c34620313b5690585b6 SHA1 9b3c244a6581245b80295be8e55950c249b2d5e2 SHA256 3c771296865c4f68d91a28074706e75a56dcf64f675aefda691652a457474c8f -MD5 170dd5da0c675366b359ebcfda3d1ec4 files/twisted-2.4.0-python-2.5-compat.patch 16764 -RMD160 1422984dd5f1503b27780c34620313b5690585b6 files/twisted-2.4.0-python-2.5-compat.patch 16764 -SHA256 3c771296865c4f68d91a28074706e75a56dcf64f675aefda691652a457474c8f files/twisted-2.4.0-python-2.5-compat.patch 16764 -AUX twisted-2.4.0-remove-newjelly.patch 9386 RMD160 805130cd16f66a2991f413e5523723068c8a9f22 SHA1 6d7b225a15ee57da80c3655a951382932659301f SHA256 3b3220af4a6d5199d320a5772338bec0e6fd81d49597eba08ec407b77bba0687 -MD5 3e43b069cd3106382dbe0765a9aeb768 files/twisted-2.4.0-remove-newjelly.patch 9386 -RMD160 805130cd16f66a2991f413e5523723068c8a9f22 files/twisted-2.4.0-remove-newjelly.patch 9386 -SHA256 3b3220af4a6d5199d320a5772338bec0e6fd81d49597eba08ec407b77bba0687 files/twisted-2.4.0-remove-newjelly.patch 9386 -AUX twisted-2.4.0-trial-attempted-fix.patch 821 RMD160 8ad6d48f2911292f58f1e75c1cbe14a45a60a70c SHA1 37740479f797dc51441896daa0e1c0271d6cc4a1 SHA256 5243eb50d3a8edd4be02ce8688da55a048ceeba96549ae34e3948ed74f908d39 -MD5 843ae7acb941b6699b0a3be386b6f157 files/twisted-2.4.0-trial-attempted-fix.patch 821 -RMD160 8ad6d48f2911292f58f1e75c1cbe14a45a60a70c files/twisted-2.4.0-trial-attempted-fix.patch 821 -SHA256 5243eb50d3a8edd4be02ce8688da55a048ceeba96549ae34e3948ed74f908d39 files/twisted-2.4.0-trial-attempted-fix.patch 821 -AUX twisted-2.4.0-trial-python-2.5-compat.patch 1664 RMD160 e21834d9c39a8fed3f28e49674bcc985e79871e2 SHA1 4b1c0b76cd1a6cab214b437a8c42b40ced1af74f SHA256 d5e02028d7a4d2888ea5f95e754c8cd08ecc41eaaeb35e73a8885c41af5ee8d5 -MD5 da67af00880597aa23e899620f72b5a4 files/twisted-2.4.0-trial-python-2.5-compat.patch 1664 -RMD160 e21834d9c39a8fed3f28e49674bcc985e79871e2 files/twisted-2.4.0-trial-python-2.5-compat.patch 1664 -SHA256 d5e02028d7a4d2888ea5f95e754c8cd08ecc41eaaeb35e73a8885c41af5ee8d5 files/twisted-2.4.0-trial-python-2.5-compat.patch 1664 -AUX twisted-2.4.0-unjellyable.patch 3404 RMD160 31ac45ff0e7ef4687c236439d7d617b42d71f0d9 SHA1 9653d6762e61bbf4dd52772f7a1d4222766e80ed SHA256 bfeb1dc3ab4a4b4ce46c134099c60a2be85b47f48095ec20853a0ed70bb2a04b -MD5 e4b9f71282b5de7423e0059dd5d0e626 files/twisted-2.4.0-unjellyable.patch 3404 -RMD160 31ac45ff0e7ef4687c236439d7d617b42d71f0d9 files/twisted-2.4.0-unjellyable.patch 3404 -SHA256 bfeb1dc3ab4a4b4ce46c134099c60a2be85b47f48095ec20853a0ed70bb2a04b files/twisted-2.4.0-unjellyable.patch 3404 -DIST Twisted-2.0.1.tar.bz2 1061899 RMD160 e67033a2a936d2252c7e039bfc41d4f74012a6ef SHA256 78d0908db2933de8f78db564ec5f035c0a171e19d8f6a375d4164f8422c29c09 -DIST Twisted-2.1.0.tar.bz2 1078044 RMD160 d4048661396c25392b048ed2b74200757b1e63c0 SHA256 a34e6fb06797c3de1e2c4037b373e633e7265e336b84a61d4f7ea8a7f0f07579 -DIST Twisted-2.2.0.tar.bz2 1285316 RMD160 c11353da93878721c8549a0594363b9d8ee38e12 SHA1 fcce114624dfde91bc1c2358f905d3170e72ad6a SHA256 537ec738c23ced2ec4a9b7f7124c2cd9bded1308331442ced0f3de7cd7562387 +DIST Twisted-2.0.1.tar.bz2 1061899 RMD160 e67033a2a936d2252c7e039bfc41d4f74012a6ef SHA1 617a1e2e053ad8825f3abdad602bc135bfeb35ba SHA256 78d0908db2933de8f78db564ec5f035c0a171e19d8f6a375d4164f8422c29c09 +DIST Twisted-2.1.0.tar.bz2 1078044 RMD160 d4048661396c25392b048ed2b74200757b1e63c0 SHA1 464c877179fa1e5a0a60120b5ce699457d208fa4 SHA256 a34e6fb06797c3de1e2c4037b373e633e7265e336b84a61d4f7ea8a7f0f07579 +DIST Twisted-2.2.0.tar.bz2 266240 RMD160 b4c0ebbf6f599b2b28f95a36b367cde44594bd21 SHA1 274b151f88dfabc1ab71212f237802ae2abd4cfa SHA256 d25e8cdc2ba22037230bc7572a6ee172cd1be339ac92ba57b63c4f5b520c7ba1 DIST TwistedCore-2.4.0.tar.bz2 1213389 RMD160 2ee341412675d2ef4582ae595adf49ce254eb88b SHA1 7e1f767999120ec65570a4e5ecd746e4de00d3ba SHA256 114f8ecf2625916f6cd65099d4321243f2b56704dddb0c96b30f6b991db484d2 -DIST Twisted_NoDocs-1.2.0.tar.bz2 1281868 RMD160 f64a258a5c767c288cf39554471c4f37c4bed136 SHA256 b9245d8c5d4f0df35a20bfefd01db3c9edd6dd814e4c69481a50f59907d25fe1 +DIST TwistedCore-2.5.0.tar.bz2 2049409 RMD160 b2abe479286ef903054b182c6d408c8f3e5aad86 SHA1 23d945c2fb473008f51fbb87af5616344721afba SHA256 3404a92012734d527a7b2029ce6f588bbc02b27904760819b2ce86f81bcddaab +DIST Twisted_NoDocs-1.2.0.tar.bz2 1281868 RMD160 f64a258a5c767c288cf39554471c4f37c4bed136 SHA1 6325d162a17e4527b60e1fcdcbf1c0c5dbd076f6 SHA256 b9245d8c5d4f0df35a20bfefd01db3c9edd6dd814e4c69481a50f59907d25fe1 DIST Twisted_NoDocs-1.3.0.tar.bz2 1545890 RMD160 9b9d8c9667ef3e68118b7509d2c5991285c3a4b9 SHA1 fb4404c588efbe3b3cee24a7fd9bf2cd875b4d2e SHA256 bef1611e10a7493647b668dfff9095754a8881b4ac9364c098ca025820b48aef EBUILD twisted-1.2.0.ebuild 996 RMD160 5194d400fa176184e37961c54d727191c3ec08dc SHA1 25d5c4d348b8715adaaf237892a4cf0510fbb625 SHA256 800994ba7f45c4b98f248b7ccdec4b0625bfd4314c88fd8897132d8e93758d0d MD5 b334a51322c3da107d175c71db5c5b68 twisted-1.2.0.ebuild 996 @@ -72,18 +56,18 @@ EBUILD twisted-2.2.0.ebuild 3190 RMD160 3769541ef6c2e45e4a408c9fd0737606ccb1dd27 MD5 892475710d346ea0897f4341d4f96b94 twisted-2.2.0.ebuild 3190 RMD160 3769541ef6c2e45e4a408c9fd0737606ccb1dd27 twisted-2.2.0.ebuild 3190 SHA256 8e3bf6445430a6b046350ef379971f69d7c6b0ad554fb645c6695e57a4d65bf3 twisted-2.2.0.ebuild 3190 -EBUILD twisted-2.4.0-r1.ebuild 3745 RMD160 7b1d9a4c9e93f19cd2a97f5ea03365553dfba202 SHA1 c3434f09ae1fa15ffdc293ba0bd0800786eae894 SHA256 9565932487845b0e3e87cc9bbb5f9cb2d2bb9780ce7a8b0685696011edb0676b -MD5 da6acb4b0b4a91973679d3fb16cea9ed twisted-2.4.0-r1.ebuild 3745 -RMD160 7b1d9a4c9e93f19cd2a97f5ea03365553dfba202 twisted-2.4.0-r1.ebuild 3745 -SHA256 9565932487845b0e3e87cc9bbb5f9cb2d2bb9780ce7a8b0685696011edb0676b twisted-2.4.0-r1.ebuild 3745 EBUILD twisted-2.4.0.ebuild 3307 RMD160 b2931431b0127c0f06f19dbbd91713c575fc8bee SHA1 f9d0ac6e68a9b635818876ad99af18afc2107c8a SHA256 1eb74b1e3c3e60d68d51a751240b3e1cbe73ceee7155f94f8a57baacc3b27277 MD5 0029eebe5bdf528bf16d3dc1f4b16e73 twisted-2.4.0.ebuild 3307 RMD160 b2931431b0127c0f06f19dbbd91713c575fc8bee twisted-2.4.0.ebuild 3307 SHA256 1eb74b1e3c3e60d68d51a751240b3e1cbe73ceee7155f94f8a57baacc3b27277 twisted-2.4.0.ebuild 3307 -MISC ChangeLog 14614 RMD160 23141a2584dd434fbdd93246093c0a6a5fa8ce94 SHA1 cfaaf35c0c01e56169fb92d749a6535195a5d604 SHA256 8cbe1736fbda7c16352784fd92fb248f15fa0318700a0bafa119acb94427dc1c -MD5 fbc6b0b08815e503f725bf78ffe56407 ChangeLog 14614 -RMD160 23141a2584dd434fbdd93246093c0a6a5fa8ce94 ChangeLog 14614 -SHA256 8cbe1736fbda7c16352784fd92fb248f15fa0318700a0bafa119acb94427dc1c ChangeLog 14614 +EBUILD twisted-2.5.0.ebuild 3215 RMD160 89a7415fded174d592c186faff778d429f22bab8 SHA1 60c01a2ae911fa5de19978ab676a064706319974 SHA256 0da48e308c08b5917d15d6d67cd0a0b57d9c84b776970f12a4c5ad4803607041 +MD5 3ba1612633eef88d0ffcf9d179ca8ad4 twisted-2.5.0.ebuild 3215 +RMD160 89a7415fded174d592c186faff778d429f22bab8 twisted-2.5.0.ebuild 3215 +SHA256 0da48e308c08b5917d15d6d67cd0a0b57d9c84b776970f12a4c5ad4803607041 twisted-2.5.0.ebuild 3215 +MISC ChangeLog 15078 RMD160 fb3716c64cb2f99db220964420157847b738ff95 SHA1 b90b8e8749df0256c724b94241a554c65dfc07b0 SHA256 d7651c4e1b68e62d1a34dba4b6c94529a2ebf06b93c0dae7ab20b7e369597a4d +MD5 663a6875ea0416fa0f861c82f7fe9cd1 ChangeLog 15078 +RMD160 fb3716c64cb2f99db220964420157847b738ff95 ChangeLog 15078 +SHA256 d7651c4e1b68e62d1a34dba4b6c94529a2ebf06b93c0dae7ab20b7e369597a4d ChangeLog 15078 MISC metadata.xml 492 RMD160 3e1f73c8b2f6645c1fb4d5b67c9c2491c9e73e2c SHA1 02360c6042bbdb343476a8332b7920ce6e6fda35 SHA256 cf5b2de8fe20a286ef9eeb5d4069eb462b240af70fdb869f26ba4b275552f01f MD5 f21532a778f6bd2aa2879327084e8aa5 metadata.xml 492 RMD160 3e1f73c8b2f6645c1fb4d5b67c9c2491c9e73e2c metadata.xml 492 @@ -100,12 +84,19 @@ SHA256 0b7df5e8856bf076241c326497f531a77fe0a1663926a01f169dc342387fdca9 files/di MD5 f31de6220dc1b05c4ae5e7d0e4bb06bc files/digest-twisted-2.1.0 247 RMD160 42077382825c92fc5e929bdb19a1452dfdf9318d files/digest-twisted-2.1.0 247 SHA256 2849192980b0962683567d1f1b5e53cc76d4b99f5830c9d11fea16702ff8a690 files/digest-twisted-2.1.0 247 -MD5 3fa954d81a62bdb393e7a56df82d513c files/digest-twisted-2.2.0 247 -RMD160 d90e86737213df3b14ee67c14de08479185469a7 files/digest-twisted-2.2.0 247 -SHA256 96a113abfd84248e540db84f191f4cb900770f3d53c9d01a725f82b85d83a401 files/digest-twisted-2.2.0 247 +MD5 8955b2952698bc99249753caae141ce0 files/digest-twisted-2.2.0 244 +RMD160 ea648dc93227f3b56d709fcbe20baf5c65959a55 files/digest-twisted-2.2.0 244 +SHA256 d16890e9805ea64fcea20fc06b83d3dbe2cdcc2189710c76025fcdf417aa6197 files/digest-twisted-2.2.0 244 MD5 644568c96d8f56d8e3fb6b24be628214 files/digest-twisted-2.4.0 259 RMD160 9fa12863b5188c5f7bca79fe65af5ecc2a36eca7 files/digest-twisted-2.4.0 259 SHA256 0c8c3cb6af6123bb8bd8e83c6696eb5998a8b1742e33bbab28aa051110a72123 files/digest-twisted-2.4.0 259 -MD5 644568c96d8f56d8e3fb6b24be628214 files/digest-twisted-2.4.0-r1 259 -RMD160 9fa12863b5188c5f7bca79fe65af5ecc2a36eca7 files/digest-twisted-2.4.0-r1 259 -SHA256 0c8c3cb6af6123bb8bd8e83c6696eb5998a8b1742e33bbab28aa051110a72123 files/digest-twisted-2.4.0-r1 259 +MD5 7617041c0d130dee5c2797d66dc42f44 files/digest-twisted-2.5.0 259 +RMD160 ad1c898847ad288365f13e88e3bcffaa3d76caa5 files/digest-twisted-2.5.0 259 +SHA256 de111c78eab8eca829ccf3c3a20915de8f1c9db62d05839b3c0fd8a150d6b718 files/digest-twisted-2.5.0 259 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.1 (GNU/Linux) + +iD8DBQFFprZPUElL7eJpfEQRAvGFAKC2wwvfacVRQm8vOD3pPK0GaDUayACfaCZy +NetznSX6EBhp8WOIpcBEcVY= +=Uz/d +-----END PGP SIGNATURE----- diff --git a/dev-python/twisted/files/digest-twisted-2.4.0-r1 b/dev-python/twisted/files/digest-twisted-2.4.0-r1 deleted file mode 100644 index 8ffcaca36b46..000000000000 --- a/dev-python/twisted/files/digest-twisted-2.4.0-r1 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 042a57f65fe919a9234047d7ce8c43f1 TwistedCore-2.4.0.tar.bz2 1213389 -RMD160 2ee341412675d2ef4582ae595adf49ce254eb88b TwistedCore-2.4.0.tar.bz2 1213389 -SHA256 114f8ecf2625916f6cd65099d4321243f2b56704dddb0c96b30f6b991db484d2 TwistedCore-2.4.0.tar.bz2 1213389 diff --git a/dev-python/twisted/files/twisted-2.4.0-python-2.5-compat.patch b/dev-python/twisted/files/twisted-2.4.0-python-2.5-compat.patch deleted file mode 100644 index 2721a7de3356..000000000000 --- a/dev-python/twisted/files/twisted-2.4.0-python-2.5-compat.patch +++ /dev/null @@ -1,463 +0,0 @@ -Index: twisted/python/usage.py -=================================================================== ---- twisted/python/usage.py (revision 17447) -+++ twisted/python/usage.py (revision 17448) -@@ -129,9 +129,12 @@ - self.__dispatch.update(dispatch) - - def __hash__(self): -- # This is required because dicts aren't hashable by default -- # (They define __cmp__ but no __hash__) -- return id(self) -+ """ -+ Define a custom hash function so that Options instances can be used -+ as dictionary keys. This is an internal feature used to implement -+ the parser. Do not rely on it in application code. -+ """ -+ return int(id(self) % sys.maxint) - - def opt_help(self): - """Display this help and exit.""" -Index: twisted/python/failure.py -=================================================================== ---- twisted/python/failure.py (revision 17447) -+++ twisted/python/failure.py (revision 17448) -@@ -14,6 +14,7 @@ - import sys - import linecache - import string -+import inspect - from cStringIO import StringIO - import types - -@@ -201,7 +202,7 @@ - globalz.items(), - ]) - tb = tb.tb_next -- if isinstance(self.type, types.ClassType): -+ if inspect.isclass(self.type) and issubclass(self.type, Exception): - parentCs = reflect.allYourBase(self.type) - self.parents = map(reflect.qual, parentCs) - self.parents.append(reflect.qual(self.type)) -@@ -244,7 +245,7 @@ - """ - for error in errorTypes: - err = error -- if isinstance(error, types.ClassType) and issubclass(error, Exception): -+ if inspect.isclass(error) and issubclass(error, Exception): - err = reflect.qual(error) - if err in self.parents: - return error -@@ -349,7 +350,7 @@ - - # postamble, if any - if not detail == 'brief': -- w("%s: %s\n" % (reflect.safe_str(self.type), -+ w("%s: %s\n" % (reflect.qual(self.type), - reflect.safe_str(self.value))) - # chaining - if isinstance(self.value, Failure): -Index: twisted/python/zipstream.py -=================================================================== ---- twisted/python/zipstream.py (revision 17447) -+++ twisted/python/zipstream.py (revision 17448) -@@ -10,6 +10,7 @@ - import os.path - import binascii - import zlib -+import struct - - class ChunkingZipFile(zipfile.ZipFile): - """A ZipFile object which, with readfile(), also gives you access -@@ -23,7 +24,24 @@ - raise RuntimeError, \ - "Attempt to read ZIP archive that was already closed" - zinfo = self.getinfo(name) -- self.fp.seek(zinfo.file_offset, 0) -+ -+ self.fp.seek(zinfo.header_offset, 0) -+ -+ # Skip the file header: -+ fheader = self.fp.read(30) -+ if fheader[0:4] != zipfile.stringFileHeader: -+ raise zipfile.BadZipfile, "Bad magic number for file header" -+ -+ fheader = struct.unpack(zipfile.structFileHeader, fheader) -+ fname = self.fp.read(fheader[zipfile._FH_FILENAME_LENGTH]) -+ if fheader[zipfile._FH_EXTRA_FIELD_LENGTH]: -+ self.fp.read(fheader[zipfile._FH_EXTRA_FIELD_LENGTH]) -+ -+ if fname != zinfo.orig_filename: -+ raise zipfile.BadZipfile, \ -+ 'File name in directory "%s" and header "%s" differ.' % ( -+ zinfo.orig_filename, fname) -+ - if zinfo.compress_type == zipfile.ZIP_STORED: - return ZipFileEntry(self.fp, zinfo.compress_size) - elif zinfo.compress_type == zipfile.ZIP_DEFLATED: -Index: twisted/python/log.py -=================================================================== ---- twisted/python/log.py (revision 17447) -+++ twisted/python/log.py (revision 17448) -@@ -74,7 +74,7 @@ - - def showwarning(message, category, filename, lineno, file=None): - if file is None: -- msg(warning=message, category=category, filename=filename, lineno=lineno, -+ msg(warning=message, category=reflect.qual(category), filename=filename, lineno=lineno, - format="%(filename)s:%(lineno)s: %(category)s: %(warning)s") - else: - _oldshowwarning(message, category, filename, lineno, file) -Index: twisted/test/test_failure.py -=================================================================== ---- twisted/test/test_failure.py (revision 17447) -+++ twisted/test/test_failure.py (revision 17448) -@@ -12,7 +12,7 @@ - import StringIO - import traceback - --from twisted.trial import unittest -+from twisted.trial import unittest, util - - - from twisted.python import failure -@@ -105,6 +105,8 @@ - self.assertEquals(sys.exc_info()[0], "bugger off") - else: - raise AssertionError("Should have raised") -+ testStringExceptions.suppress = [ -+ util.suppress(message='raising a string exception is deprecated')] - - def testBrokenStr(self): - x = BrokenStr() -Index: twisted/test/test_pbfailure.py -=================================================================== ---- twisted/test/test_pbfailure.py (revision 17447) -+++ twisted/test/test_pbfailure.py (revision 17448) -@@ -4,23 +4,37 @@ - - from twisted.trial import unittest - --from twisted.spread import pb, flavors, jelly -+from twisted.spread import pb, flavors - from twisted.internet import reactor, defer - from twisted.python import log, failure - - ## - # test exceptions - ## --class PoopError(Exception): pass --class FailError(Exception): pass --class DieError(Exception): pass --class TimeoutError(Exception): pass -+class PoopError(Exception): -+ pass - - -+class FailError(Exception): -+ pass -+ -+ -+class DieError(Exception): -+ pass -+ -+ -+class TimeoutError(Exception): -+ pass -+ -+ - #class JellyError(flavors.Jellyable, pb.Error): pass --class JellyError(flavors.Jellyable, pb.Error, pb.RemoteCopy): pass --class SecurityError(pb.Error, pb.RemoteCopy): pass -+class JellyError(flavors.Jellyable, pb.Error, pb.RemoteCopy): -+ pass - -+ -+class SecurityError(pb.Error, pb.RemoteCopy): -+ pass -+ - pb.setUnjellyableForClass(JellyError, JellyError) - pb.setUnjellyableForClass(SecurityError, SecurityError) - pb.globalSecurity.allowInstancesOf(SecurityError) -@@ -98,13 +112,94 @@ - class PBFailureTest(PBConnTestCase): - compare = unittest.TestCase.assertEquals - -- def testPBFailures(self): -- d = self.clientFactory.getRootObject() -- d.addCallback(self.connected) -- d.addCallback(self.cleanupLoggedErrors) -- return d - -+ def _addFailingCallbacks(self, remoteCall, expectedResult, eb): -+ remoteCall.addCallbacks(self.success, eb, -+ callbackArgs=(expectedResult,)) -+ return remoteCall - -+ -+ def _testImpl(self, method, expected, eb, exc=None): -+ rootDeferred = self.clientFactory.getRootObject() -+ def gotRootObj(obj): -+ failureDeferred = self._addFailingCallbacks(obj.callRemote(method), expected, eb) -+ if exc is not None: -+ def gotFailure(err): -+ self.assertEquals(len(log.flushErrors(exc)), 1) -+ return err -+ failureDeferred.addBoth(gotFailure) -+ return failureDeferred -+ rootDeferred.addCallback(gotRootObj) -+ return rootDeferred -+ -+ -+ def testPoopError(self): -+ """ -+ Test that a Deferred returned by a remote method which already has a -+ Failure correctly has that error passed back to the calling side. -+ """ -+ return self._testImpl('poop', 42, self.failurePoop, PoopError) -+ -+ -+ def testFailureFailure(self): -+ """ -+ Test that a remote method which synchronously raises an exception -+ has that exception passed back to the calling side. -+ """ -+ return self._testImpl('fail', 420, self.failureFail, FailError) -+ -+ -+ def testDieFailure(self): -+ """ -+ The same as testFailureFailure (it is not clear to me why this -+ exists, but I am not deleting it as part of this refactoring. -+ -exarkun). -+ """ -+ return self._testImpl('die', 4200, self.failureDie, DieError) -+ -+ -+ def testNoSuchFailure(self): -+ """ -+ Test that attempting to call a method which is not defined correctly -+ results in an AttributeError on the calling side. -+ """ -+ return self._testImpl('nosuch', 42000, self.failureNoSuch, AttributeError) -+ -+ -+ def testJellyFailure(self): -+ """ -+ Test that an exception which is a subclass of L{pb.Error} has more -+ information passed across the network to the calling side. -+ """ -+ return self._testImpl('jelly', 43, self.failureJelly) -+ -+ -+ def testSecurityFailure(self): -+ """ -+ Test that even if an exception is not explicitly jellyable (by being -+ a L{pb.Jellyable} subclass), as long as it is an L{pb.Error} -+ subclass it receives the same special treatment. -+ """ -+ return self._testImpl('security', 430, self.failureSecurity) -+ -+ -+ def testDeferredJellyFailure(self): -+ """ -+ Test that a Deferred which fails with a L{pb.Error} is treated in -+ the same way as a synchronously raised L{pb.Error}. -+ """ -+ return self._testImpl('deferredJelly', 4300, self.failureDeferredJelly, JellyError) -+ -+ -+ def testDeferredSecurity(self): -+ """ -+ Test that a Deferred which fails with a L{pb.Error} which is not -+ also a L{pb.Jellyable} is treated in the same way as a synchronously -+ raised exception of the same type. -+ """ -+ return self._testImpl('deferredSecurity', 43000, self.failureDeferredSecurity, SecurityError) -+ -+ - def testCopiedFailureLogging(self): - d = self.clientFactory.getRootObject() - -@@ -120,12 +215,6 @@ - - return d - -- -- def addFailingCallbacks(self, remoteCall, expectedResult, eb): -- remoteCall.addCallbacks(self.success, eb, -- callbackArgs=(expectedResult,)) -- return remoteCall -- - ## - # callbacks - ## -@@ -136,19 +225,6 @@ - self.assertEquals(len(errors), 6) - return ignored - -- def connected(self, persp): -- methods = (('poop', 42, self.failurePoop), -- ('fail', 420, self.failureFail), -- ('die', 4200, self.failureDie), -- ('nosuch', 42000, self.failureNoSuch), -- ('jelly', 43, self.failureJelly), -- ('security', 430, self.failureSecurity), -- ('deferredJelly', 4300, self.failureDeferredJelly), -- ('deferredSecurity', 43000, self.failureDeferredSecurity)) -- return defer.gatherResults([ -- self.addFailingCallbacks(persp.callRemote(meth), result, eb) -- for (meth, result, eb) in methods]) -- - def success(self, result, expectedResult): - self.assertEquals(result, expectedResult) - return result -Index: twisted/test/test_stdio.py -=================================================================== ---- twisted/test/test_stdio.py (revision 17447) -+++ twisted/test/test_stdio.py (revision 17448) -@@ -42,7 +42,7 @@ - return reactor.spawnProcess( - proto, - sys.executable, -- ["python", filepath.FilePath(__file__).sibling(sibling).path, reactor.__class__.__module__] + list(args), -+ [sys.executable, filepath.FilePath(__file__).sibling(sibling).path, reactor.__class__.__module__] + list(args), - env=subenv, - ) - -Index: twisted/test/test_jelly.py -=================================================================== ---- twisted/test/test_jelly.py (revision 17447) -+++ twisted/test/test_jelly.py (revision 17448) -@@ -62,7 +62,7 @@ - def __init__(self, x, y): - self.x = x - self.y = y -- -+ - def isTheSameAs(self, other): - return self.__dict__ == other.__dict__ - -@@ -95,7 +95,6 @@ - m = jelly.unjelly(c) - self.failUnless(isinstance(m, NewStyle)) - self.assertIdentical(m.n2, m.n3) -- testNewStyle.todo = "jelly does not support new-style classes yet" - - - def testDateTime(self): -Index: twisted/spread/flavors.py -=================================================================== ---- twisted/spread/flavors.py (revision 17447) -+++ twisted/spread/flavors.py (revision 17448) -@@ -27,7 +27,7 @@ - # mechanisms (like XMLRPC) - - # system imports --import types -+import sys - from zope.interface import implements - - # twisted imports -@@ -480,7 +480,7 @@ - def __hash__(self): - """Hash me. - """ -- return id(self.__dict__) -+ return int(id(self.__dict__) % sys.maxint) - - broker = None - luid = None -Index: twisted/spread/jelly.py -=================================================================== ---- twisted/spread/jelly.py (revision 17447) -+++ twisted/spread/jelly.py (revision 17448) -@@ -58,7 +58,6 @@ - # System Imports - import string - import pickle --import sys - import types - from types import StringType - try: -@@ -68,7 +67,6 @@ - from types import IntType - from types import TupleType - from types import ListType --from types import DictType - from types import LongType - from types import FloatType - from types import FunctionType -@@ -88,9 +86,9 @@ - from zope.interface import implements - - # Twisted Imports --from twisted.python.reflect import namedObject, namedModule, qual -+from twisted.python.reflect import namedObject, qual - from twisted.persisted.crefutil import NotKnown, _Tuple, _InstanceMethod, _DictKeyAndValue, _Dereference --from twisted.python import runtime, components -+from twisted.python import runtime - - from twisted.spread.interfaces import IJellyable, IUnjellyable - -@@ -416,8 +414,7 @@ - return preRef - return obj.jellyFor(self) - objType = type(obj) -- if self.taster.isTypeAllowed( -- string.replace(objType.__name__, ' ', '_')): -+ if self.taster.isTypeAllowed(qual(objType)): - # "Immutable" Types - if ((objType is StringType) or - (objType is IntType) or -@@ -455,7 +452,7 @@ - return ['date', '%s %s %s' % (obj.year, obj.month, obj.day)] - elif objType is datetime.timedelta: - return ['timedelta', '%s %s %s' % (obj.days, obj.seconds, obj.microseconds)] -- elif objType is ClassType or issubclass(type, objType): -+ elif objType is ClassType or issubclass(objType, type): - return ['class', qual(obj)] - else: - preRef = self._checkMutable(obj) -@@ -475,7 +472,7 @@ - sxp.append(dictionary_atom) - for key, val in obj.items(): - sxp.append([self.jelly(key), self.jelly(val)]) -- elif objType is InstanceType: -+ else: - className = qual(obj.__class__) - persistent = None - if self.persistentStore: -@@ -494,11 +491,9 @@ - self.unpersistable( - "instance of class %s deemed insecure" % - qual(obj.__class__), sxp) -- else: -- raise NotImplementedError("Don't know the type: %s" % objType) - return self.preserve(obj, sxp) - else: -- if objType is types.InstanceType: -+ if objType is InstanceType: - raise InsecureJelly("Class not allowed for instance: %s %s" % - (obj.__class__, obj)) - raise InsecureJelly("Type not allowed for object: %s %s" % -@@ -682,7 +677,7 @@ - raise InsecureJelly("module %s not allowed" % modName) - klaus = namedObject(rest[0]) - if type(klaus) is not types.ClassType: -- raise InsecureJelly("class %s unjellied to something that isn't a class: %s" % (repr(name), repr(klaus))) -+ raise InsecureJelly("class %s unjellied to something that isn't a class: %s" % (repr(rest[0]), repr(klaus))) - if not self.taster.isClassAllowed(klaus): - raise InsecureJelly("class not allowed: %s" % qual(klaus)) - return klaus -@@ -833,7 +828,9 @@ - """SecurityOptions.allowTypes(typeString): Allow a particular type, by its name. - """ - for typ in types: -- self.allowedTypes[string.replace(typ, ' ', '_')]=1 -+ if not isinstance(typ, str): -+ typ = qual(typ) -+ self.allowedTypes[typ] = 1 - - def allowInstancesOf(self, *classes): - """SecurityOptions.allowInstances(klass, klass, ...): allow instances diff --git a/dev-python/twisted/files/twisted-2.4.0-remove-newjelly.patch b/dev-python/twisted/files/twisted-2.4.0-remove-newjelly.patch deleted file mode 100644 index 3490006f17cb..000000000000 --- a/dev-python/twisted/files/twisted-2.4.0-remove-newjelly.patch +++ /dev/null @@ -1,329 +0,0 @@ -Index: twisted/test/test_jelly.py -=================================================================== ---- twisted/test/test_jelly.py (revision 17351) -+++ twisted/test/test_jelly.py (revision 17352) -@@ -6,10 +6,12 @@ - """Test cases for 'jelly' object serialization. - """ - --from twisted.spread import jelly -+import datetime, types - --from twisted.test import test_newjelly -+from twisted.spread import jelly, pb - -+from twisted.trial import unittest -+ - class TestNode(object, jelly.Jellyable): - """An object to test jellyfying of new style class isntances. - """ -@@ -24,12 +26,224 @@ - self.children = [] - - --class JellyTestCase(test_newjelly.JellyTestCase): -- jc = jelly -- if test_newjelly.haveDatetime: -- def testDateTime(self): -- test_newjelly.JellyTestCase.testDateTime(self) -+class A: -+ """ -+ dummy class -+ """ -+ def amethod(self): -+ pass - -+def afunc(self): -+ pass -+ -+class B: -+ """ -+ dummy class -+ """ -+ def bmethod(self): -+ pass -+ -+ -+class C: -+ """ -+ dummy class -+ """ -+ def cmethod(self): -+ pass -+ -+ -+class D(object): -+ """ -+ newstyle class -+ """ -+ -+ -+class SimpleJellyTest: -+ def __init__(self, x, y): -+ self.x = x -+ self.y = y -+ -+ def isTheSameAs(self, other): -+ return self.__dict__ == other.__dict__ -+ -+ -+class NewStyle(object): -+ pass -+ -+ -+class JellyTestCase(unittest.TestCase): -+ """ -+ testcases for `jelly' module serialization. -+ """ -+ -+ def testMethodSelfIdentity(self): -+ a = A() -+ b = B() -+ a.bmethod = b.bmethod -+ b.a = a -+ im_ = jelly.unjelly(jelly.jelly(b)).a.bmethod -+ self.assertEquals(im_.im_class, im_.im_self.__class__) -+ -+ -+ def testNewStyle(self): -+ n = NewStyle() -+ n.x = 1 -+ n2 = NewStyle() -+ n.n2 = n2 -+ n.n3 = n2 -+ c = jelly.jelly(n) -+ m = jelly.unjelly(c) -+ self.failUnless(isinstance(m, NewStyle)) -+ self.assertIdentical(m.n2, m.n3) -+ testNewStyle.todo = "jelly does not support new-style classes yet" -+ -+ -+ def testDateTime(self): -+ dtn = datetime.datetime.now() -+ dtd = datetime.datetime.now() - dtn -+ input = [dtn, dtd] -+ c = jelly.jelly(input) -+ output = jelly.unjelly(c) -+ self.assertEquals(input, output) -+ self.assertNotIdentical(input, output) -+ -+ -+ def testSimple(self): -+ """ -+ simplest test case -+ """ -+ self.failUnless(SimpleJellyTest('a', 'b').isTheSameAs(SimpleJellyTest('a', 'b'))) -+ a = SimpleJellyTest(1, 2) -+ cereal = jelly.jelly(a) -+ b = jelly.unjelly(cereal) -+ self.failUnless(a.isTheSameAs(b)) -+ -+ -+ def testIdentity(self): -+ """ -+ test to make sure that objects retain identity properly -+ """ -+ x = [] -+ y = (x) -+ x.append(y) -+ x.append(y) -+ self.assertIdentical(x[0], x[1]) -+ self.assertIdentical(x[0][0], x) -+ s = jelly.jelly(x) -+ z = jelly.unjelly(s) -+ self.assertIdentical(z[0], z[1]) -+ self.assertIdentical(z[0][0], z) -+ -+ -+ def testUnicode(self): -+ if hasattr(types, 'UnicodeType'): -+ x = unicode('blah') -+ y = jelly.unjelly(jelly.jelly(x)) -+ self.assertEquals(x, y) -+ self.assertEquals(type(x), type(y)) -+ -+ -+ def testStressReferences(self): -+ reref = [] -+ toplevelTuple = ({'list': reref}, reref) -+ reref.append(toplevelTuple) -+ s = jelly.jelly(toplevelTuple) -+ z = jelly.unjelly(s) -+ self.assertIdentical(z[0]['list'], z[1]) -+ self.assertIdentical(z[0]['list'][0], z) -+ -+ -+ def testMoreReferences(self): -+ a = [] -+ t = (a,) -+ a.append((t,)) -+ s = jelly.jelly(t) -+ z = jelly.unjelly(s) -+ self.assertIdentical(z[0][0][0], z) -+ -+ -+ def testTypeSecurity(self): -+ """ -+ test for type-level security of serialization -+ """ -+ taster = jelly.SecurityOptions() -+ dct = jelly.jelly({}) -+ self.assertRaises(jelly.InsecureJelly, jelly.unjelly, dct, taster) -+ -+ -+ def testNewStyleClasses(self): -+ j = jelly.jelly(D) -+ uj = jelly.unjelly(D) -+ self.assertIdentical(D, uj) -+ -+ -+ def testLotsaTypes(self): -+ """ -+ test for all types currently supported in jelly -+ """ -+ a = A() -+ jelly.unjelly(jelly.jelly(a)) -+ jelly.unjelly(jelly.jelly(a.amethod)) -+ items = [afunc, [1, 2, 3], not bool(1), bool(1), 'test', 20.3, (1,2,3), None, A, unittest, {'a':1}, A.amethod] -+ for i in items: -+ self.assertEquals(i, jelly.unjelly(jelly.jelly(i))) -+ -+ -+ def testSetState(self): -+ global TupleState -+ class TupleState: -+ def __init__(self, other): -+ self.other = other -+ def __getstate__(self): -+ return (self.other,) -+ def __setstate__(self, state): -+ self.other = state[0] -+ def __hash__(self): -+ return hash(self.other) -+ a = A() -+ t1 = TupleState(a) -+ t2 = TupleState(a) -+ t3 = TupleState((t1, t2)) -+ d = {t1: t1, t2: t2, t3: t3, "t3": t3} -+ t3prime = jelly.unjelly(jelly.jelly(d))["t3"] -+ self.assertIdentical(t3prime.other[0].other, t3prime.other[1].other) -+ -+ -+ def testClassSecurity(self): -+ """ -+ test for class-level security of serialization -+ """ -+ taster = jelly.SecurityOptions() -+ taster.allowInstancesOf(A, B) -+ a = A() -+ b = B() -+ c = C() -+ # add a little complexity to the data -+ a.b = b -+ a.c = c -+ # and a backreference -+ a.x = b -+ b.c = c -+ # first, a friendly insecure serialization -+ friendly = jelly.jelly(a, taster) -+ x = jelly.unjelly(friendly, taster) -+ self.failUnless(isinstance(x.c, jelly.Unpersistable), -+ "C came back: %s" % x.c.__class__) -+ # now, a malicious one -+ mean = jelly.jelly(a) -+ try: -+ x = jelly.unjelly(mean, taster) -+ self.fail("x came back: %s" % x) -+ except jelly.InsecureJelly: -+ # OK -+ pass -+ self.assertIdentical(x.x, x.b, "Identity mismatch") -+ #test class serialization -+ friendly = jelly.jelly(A, taster) -+ x = jelly.unjelly(friendly, taster) -+ self.assertIdentical(x, A, "A came back: %s" % x) -+ -+ - def testUnjellyable(self): - """ - Test that if Unjellyable is used to deserialize a jellied object, -@@ -58,7 +272,6 @@ - pid = int(pidstr) - return perst[0][pid] - -- SimpleJellyTest = test_newjelly.SimpleJellyTest - a = SimpleJellyTest(1, 2) - b = SimpleJellyTest(3, 4) - c = SimpleJellyTest(5, 6) -@@ -67,26 +280,28 @@ - a.c = c - c.b = b - -- jel = self.jc.jelly(a, persistentStore = persistentStore) -- x = self.jc.unjelly(jel, persistentLoad = persistentLoad) -+ jel = jelly.jelly(a, persistentStore = persistentStore) -+ x = jelly.unjelly(jel, persistentLoad = persistentLoad) - - self.assertIdentical(x.b, x.c.b) - # assert len(perst) == 3, "persistentStore should only be called 3 times." - self.failUnless(perst[0], "persistentStore was not called.") - self.assertIdentical(x.b, a.b, "Persistent storage identity failure.") - -+ - def testNewStyleClasses(self): - n = TestNode() - n1 = TestNode(n) - n11 = TestNode(n1) - n2 = TestNode(n) - # Jelly it -- jel = self.jc.jelly(n) -- m = self.jc.unjelly(jel) -+ jel = jelly.jelly(n) -+ m = jelly.unjelly(jel) - # Check that it has been restored ok - TestNode.classAttr == 5 # Shouldn't override jellied values - self._check_newstyle(n,m) - -+ - def _check_newstyle(self, a, b): - self.assertEqual(a.id, b.id) - self.assertEqual(a.classAttr, 4) -@@ -95,5 +310,36 @@ - for x,y in zip(a.children, b.children): - self._check_newstyle(x,y) - --class CircularReferenceTestCase(test_newjelly.CircularReferenceTestCase): -- jc = jelly -+ -+ -+class ClassA(pb.Copyable, pb.RemoteCopy): -+ def __init__(self): -+ self.ref = ClassB(self) -+ -+ -+ -+class ClassB(pb.Copyable, pb.RemoteCopy): -+ def __init__(self, ref): -+ self.ref = ref -+ -+ -+ -+class CircularReferenceTestCase(unittest.TestCase): -+ def testSimpleCircle(self): -+ jelly.setUnjellyableForClass(ClassA, ClassA) -+ jelly.setUnjellyableForClass(ClassB, ClassB) -+ a = jelly.unjelly(jelly.jelly(ClassA())) -+ self.failUnless(a.ref.ref is a, "Identity not preserved in circular reference") -+ -+ -+ def testCircleWithInvoker(self): -+ class dummyInvokerClass: pass -+ dummyInvoker = dummyInvokerClass() -+ dummyInvoker.serializingPerspective = None -+ a0 = ClassA() -+ jelly.setUnjellyableForClass(ClassA, ClassA) -+ jelly.setUnjellyableForClass(ClassB, ClassB) -+ j = jelly.jelly(a0, invoker=dummyInvoker) -+ a1 = jelly.unjelly(j) -+ self.failUnlessIdentical(a1.ref.ref, a1, -+ "Identity not preserved in circular reference") diff --git a/dev-python/twisted/files/twisted-2.4.0-trial-attempted-fix.patch b/dev-python/twisted/files/twisted-2.4.0-trial-attempted-fix.patch deleted file mode 100644 index ae0ea71566a6..000000000000 --- a/dev-python/twisted/files/twisted-2.4.0-trial-attempted-fix.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: twisted/trial/reporter.py -=================================================================== ---- twisted/trial/reporter.py (revision 17375) -+++ twisted/trial/reporter.py (revision 17376) -@@ -71,7 +71,7 @@ - @type fail: L{failure.Failure} or L{tuple} - """ - if isinstance(fail, tuple): -- fail = failure.Failure(*fail) -+ fail = failure.Failure(fail[1], fail[0], fail[2]) - self.failures.append((test, fail)) - - def addError(self, test, error): -@@ -81,7 +81,7 @@ - @type fail: L{failure.Failure} or L{tuple} - """ - if isinstance(error, tuple): -- error = failure.Failure(*error) -+ error = failure.Failure(error[1], error[0], error[2]) - self.errors.append((test, error)) - - def addSkip(self, test, reason): diff --git a/dev-python/twisted/files/twisted-2.4.0-trial-python-2.5-compat.patch b/dev-python/twisted/files/twisted-2.4.0-trial-python-2.5-compat.patch deleted file mode 100644 index e31f3e9bb5d6..000000000000 --- a/dev-python/twisted/files/twisted-2.4.0-trial-python-2.5-compat.patch +++ /dev/null @@ -1,49 +0,0 @@ -Index: twisted/trial/test/test_output.py -=================================================================== ---- twisted/trial/test/test_output.py (revision 17477) -+++ twisted/trial/test/test_output.py (revision 17478) -@@ -101,7 +101,7 @@ - self.failUnlessIn(d, '[ERROR]') - self.failUnlessIn(d, 'package.test_bad_module') - self.failIfIn(d, 'IOError') -- self.failIfIn(d, '=dev-lang/python-2.3"; then - "${python}" setup.py install --root="${T}/tests" --no-compile || die - else - "${python}" setup.py install --root="${T}/tests" || die - fi - - cd "${T}/tests/usr/$(get_libdir)/python${PYVER}/site-packages/" || die - - # prevent it from pulling in plugins from already installed - # twisted packages - rm twisted/plugins/__init__.py || die - - # an empty file doesn't work because the tests check for - # docstrings in all packages - echo "'''plugins stub'''" > twisted/plugins/__init__.py || die - - PYTHONPATH=. "${T}"/tests/usr/bin/trial twisted || die "trial failed" - cd "${S}" - rm -rf "${T}/tests" -}