--- twisted-words-8.2.0.orig/debian/changelog +++ twisted-words-8.2.0/debian/changelog @@ -0,0 +1,508 @@ +twisted-words (8.2.0-2) unstable; urgency=low + + * Avoid md5/sha1 deprecation warnings. + + -- Matthias Klose Sat, 18 Apr 2009 14:23:52 +0200 + +twisted-words (8.2.0-1) unstable; urgency=low + + * New upstream version. + + -- Matthias Klose Sun, 08 Mar 2009 08:48:29 +0100 + +twisted-words (8.2.0-0) unstable; urgency=low + + * New upstream version. + + -- Esteve Fernandez Sat, 31 Jan 2009 14:40:54 +0100 + +twisted-words (8.1.0-2) unstable; urgency=low + + * Depend on python-openssl. Closes: #462174. + + -- Matthias Klose Tue, 08 Jul 2008 16:21:45 +0200 + +twisted-words (8.1.0-1) unstable; urgency=low + + * New upstream version. + + -- Matthias Klose Thu, 29 May 2008 00:02:31 +0200 + +twisted-words (8.0.0-1) unstable; urgency=low + + * New upstream version. + + -- Matthias Klose Sun, 30 Mar 2008 22:11:20 +0200 + +twisted-words (0.5.0-1.1) unstable; urgency=high + + * Non-maintainer upload. + * Re-add fixes which were not merged from the 0.4.0-2.1 NMU by + Arjan Oosting. + * Add missing dependencies on python-gtk-1.2 and python-glade-1.2; + closes: #407677. + * Fix menu file to check for python-twisted-words instead of python-twisted. + * Bump up python-central to >= 0.5 to please lintian. + + -- Loic Minier Sun, 24 Jun 2007 11:30:43 +0200 + +twisted-words (0.5.0-1) unstable; urgency=low + + * New upstream version. + * debian/control: Update (build-)dependencies. + * debian/watch: Update. + + -- Matthias Klose Sun, 20 May 2007 20:26:35 +0200 + +twisted-words (0.4.0-2) unstable; urgency=medium + + * Fix command in menu file (/usr/bin/im). Closes: #368491. + + -- Matthias Klose Mon, 8 Jan 2007 00:41:23 +0100 + +twisted-words (0.4.0-1) unstable; urgency=low + + * New upstream version. + * Convert packaging to use python-central (closes: #373401). + + -- Matthias Klose Thu, 15 Jun 2006 23:58:45 +0000 + +twisted-words (0.3.0-2.1) unstable; urgency=low + + * Non-maintainer Upload (with permission). + * Build-Depend on -twisted-core instead of -twisted (closes: #357925). + + -- Simon Huggins Mon, 15 May 2006 18:38:14 +0100 + +twisted-words (0.3.0-2) unstable; urgency=low + + * Depend on -core packages instead of transitional -twisted packages. + Closes: #351207. + + -- Matthias Klose Fri, 3 Feb 2006 09:54:40 +0000 + +twisted-words (0.3.0-1) unstable; urgency=low + + * New upstream version, words splitted out in it's own tarball. + + -- Matthias Klose Mon, 16 Jan 2006 01:17:45 +0100 + +twisted (2.0.1-4) unstable; urgency=low + + * Fix doc symlinks (closes: #313313). + * Remove conflict with supyb, requested by the supyb maintainer. + * Suggest python-wxgtk2.4 | python-wxgtk2.6. + * Fix man page symlinks (closes: #326021, #314508, #315307, #323551). + * Fix location of the tutorial in the doc-base file (closes: #318167). + * python-twisted: Add dependency on python-soappy (closes: #317290). + + -- Matthias Klose Thu, 1 Sep 2005 15:49:29 +0200 + +twisted (2.0.1-3) unstable; urgency=low + + * Drop python2.2 packages, build python2.4 packages. + + -- Matthias Klose Sun, 12 Jun 2005 19:05:59 +0200 + +twisted (2.0.1-2) unstable; urgency=low + + * Reupload as -2, -1 is sticking in the NEW queue from a hijack attempt. + + -- Matthias Klose Sun, 12 Jun 2005 18:41:05 +0200 + +twisted (2.0.1-1) unstable; urgency=low + + * New upstream version, built from the sumo tarball. + * (Build-)depend on zope-interface. + * Explicitely conflict with all current packages depending on + python-twisted and python-twisted-conch. Please check for + compatibility first. + * Do provide menu entries for the default version only. + * Empty twisted-doc-api package at the moment. + * Use debhelper for the packaging. + * Change priority to optional. + + -- Matthias Klose Sun, 12 Jun 2005 14:52:40 +0200 + +twisted (1.3.0-8) unstable; urgency=low + + * Fix the fix in gtk2reactor. + + -- Matthias Klose Fri, 11 Feb 2005 14:45:43 +0100 + +twisted (1.3.0-7) unstable; urgency=low + + * Conditionally import the profile module (closes: #294493). + * Add suggestions to the python-profiler package. + * Suppress gtk2 user warning in gtk2reactor (closes: #291310). + + -- Matthias Klose Thu, 10 Feb 2005 13:12:20 +0100 + +twisted (1.3.0-6) unstable; urgency=medium + + * Fix two bad mail-related bugs, which are really harmful for the + scalemail application (Tommi Virtanen): + - insufficient error handling in mail delivery, causing mail loss + (fixed by r12036) + - unable to send mail from <> (fixed by r12767, which broke receiving + mail from <>, which is fixed in r12858). + Closes: #289993. + + -- Matthias Klose Sat, 15 Jan 2005 23:49:03 +0100 + +twisted (1.3.0-5) unstable; urgency=low + + * Fix memory leak in _c_urlarg.c (closes: #284818). + * python2.3-twisted: Add python-glade-1.2 python-gtk-1.2 suggests. + Closes: #283238. + + -- Matthias Klose Mon, 20 Dec 2004 19:23:11 +0100 + +twisted (1.3.0-4) unstable; urgency=low + + * Fix package recommendations. + * twisted/xish/domish.py: Add fixes for jabber protocol implementation. + Alexandre Fayolle. Closes: #273141. + + -- Matthias Klose Wed, 6 Oct 2004 08:06:47 +0200 + +twisted (1.3.0-3) unstable; urgency=medium + + * twisted-doc-api: Add link to docs (closes: #255888). + * twisted-doc: Rename examples/xindex.html (closes: #255887). + * twisted-doc: Include the Twisted tutorial (closes: #256598). + * Install the PDF version of the Twisted Book, not the PostScript version. + * python-twisted: Recommend the python-serial package. + * Fix nmea protocol failing when checksums turned off (closes: #243136). + * Add support for bool types in Twisted Serialize module (python2.3 only). + Closes: #217053. + + -- Matthias Klose Sun, 29 Aug 2004 15:31:36 +0200 + +twisted (1.3.0-2) unstable; urgency=low + + * Fix links in twisted-doc's index.html (closes: #255548). + + -- Matthias Klose Mon, 21 Jun 2004 22:01:11 +0200 + +twisted (1.3.0-1) unstable; urgency=low + + * New upstream version. + * Hijacking the package. + See http://lists.debian.org/debian-qa/2004/06/msg00070.html. + * Fix doc-base file (closes: #220698, #220699). + * html files are included as .html, not .xhtml (closes: #192600). + * Make package descriptions more verbose (closes: #209816). + * Fix some lintian errors. + + -- Matthias Klose Sat, 19 Jun 2004 00:54:55 +0200 + +twisted (1.2.0-1.1) unstable; urgency=low + + * NMU. + * Fix suggestions and recommendations: + - Make python-pyopenssl, python-pam recommendations. + - Make python-tk, python-gtk2, python-glade2, python-qt3, + libwxgtk2.4-python suggestions. + Closes: #240564. + * python-twisted-conch: Depend on python2.3-twisted-conch. + * Use Debian's way importing gtk2: + - doc/examples/pbgtk2.py + - twisted/spread/ui/gtk2util.py + * The Debian package provided upstream isn't a big help, as it's just + an outdated copy of the Debian package :-( + + -- Matthias Klose Sat, 17 Apr 2004 14:25:26 +0200 + +twisted (1.2.0-1) unstable; urgency=low + + * New upstream version (closes: #211102). + + -- Matthias Klose Thu, 26 Feb 2004 07:05:22 +0100 + +twisted (1.1.2-1) unstable; urgency=low + + * New upstream version + + -- Moshe Zadka Thu, 18 Feb 2004 12:03:02 -0500 + +twisted (1.1.1-1) unstable; urgency=low + + * New upstream version + + -- Moshe Zadka Thu, 15 Jan 2004 12:03:02 -0500 + +twisted (1.1.0-1) unstable; urgency=low + + * New upstream version + + -- Moshe Zadka Thu, 21 Nov 2003 14:56:54 -0500 + +twisted (1.0.7-1) unstable; urgency=low + + * New upstream version + + -- Moshe Zadka Thu, 17 Sep 2003 00:33:51 -0500 + +twisted (1.0.6-1) unstable; urgency=low + + * New upstream version. + * NMU (encouraged by maintainer) + + -- Martin Sjogren Thu, 3 Jul 2003 07:45:27 +0200 + +twisted (1.0.5-1) unstable; urgency=low + + * New upstream version + * Remove Python 2.1 packages -- upstream no longer supports 2.1 + + -- Moshe Zadka Thu, 1 May 2003 09:06:49 +0300 + +twisted (1.0.4-1) unstable; urgency=low + + * New upstream version + + -- Moshe Zadka Fri, 18 Apr 2003 03:46:22 +0000 + +twisted (1.0.3-1) unstable; urgency=low + + * Split out conch + * This allows us to have conch properly depend on python-crypto + * Documentation improvements + * Installing xhtml versions of everything + * Distributing ps and pdf versions of book + * doc-base support + * Split out doc-api + * It's HUGE and many people don't need it (since it is available on the + web) + + -- Moshe Zadka Tue, 12 Nov 2002 02:59:56 -0600 + +twisted (1.0.0-2) unstable; urgency=low + + * Put api docs in api/ (Closes: #167196) + + -- Moshe Zadka Thu, 7 Nov 2002 12:27:37 -0600 + +twisted (1.0.0-1) unstable; urgency=low + + * New upstream release + + -- Moshe Zadka Tue, 22 Oct 2002 06:22:49 -0500 + +twisted (0.99.2-4) unstable; urgency=low + + * UGH! Python 2.3 distutils bug is back + * Working around it + + -- Moshe Zadka Wed, 2 Oct 2002 12:07:25 +0000 + +twisted (0.99.2-3) unstable; urgency=low + + * Adding "/usr/bin/python" to build dependencies. + + -- Moshe Zadka Mon, 30 Sep 2002 15:46:56 +0000 + +twisted (0.99.2-2) unstable; urgency=low + + * Enabling Python 2.3 support + + -- Moshe Zadka Fri, 27 Sep 2002 10:49:43 -0500 + +twisted (0.99.2-1) unstable; urgency=low + + * New upstream + * Fixed build dependencies (Closes: #159258) + + -- Moshe Zadka Mon, 23 Sep 2002 08:56:05 -0500 + +twisted (0.99.0-1) unstable; urgency=low + + * New upstream version. + * Packaging changes: + * "Twisted" is now a package, to facilitate upgrades from woody + (there are verioned depends:) + * New package: twisted-quotes -- quotes collected by the Twisted release + team + + -- Moshe Zadka Thu, 29 Aug 2002 08:05:38 -0500 + +twisted (0.19.0-2) unstable; urgency=low + + * Gagh, make python2.2-twisted any, not all. + + -- Moshe Zadka Wed, 31 Jul 2002 02:25:23 -0500 + +twisted (0.19.0-1) unstable; urgency=low + + * New upstream release + * Debian packaging changes: + * split python2.x-twisted into python2.x-twisted and python2.x-twisted-bin + * unfortunately, because of distutils mind boggling stupidity, it will + do most of the work for building the arch-independant utilities when + building the c module + * fortunately, twisted will now take up much less room in the archive + + -- Moshe Zadka Wed, 19 Jun 2002 18:01:50 +0300 + +twisted (0.18.0-2) unstable; urgency=low + + * The "Aaaaarrrgghhh, I'm stupid release" + * debian/control: python2.1-twisted needs to Conflict:/Replace: twisted too + + -- Moshe Zadka Tue, 18 Jun 2002 20:22:08 +0300 + +twisted (0.18.0-1) unstable; urgency=low + + * New upstream release + * Lots of debian changes: + * building python2.1-twisted, python2.2-twisted + * python-twisted depends on python2.1-twisted + * menu support for t-im and manhole enabled + * Removed debelper + * Added debian/scripts/ directory with helper scripts + * This will (hopefully) mean support python2.3 will be easy + * Upstream fixed tcp client (Closes: #142789) + + -- Moshe Zadka Tue, 28 May 2002 12:35:35 +0300 + +twisted (0.17.3-1) unstable; urgency=low + + * New upstream release + + -- Moshe Zadka Fri, 19 Apr 2002 02:55:43 -0500 + +twisted (0.17.0-1) unstable; urgency=low + + * New upstream release + * Now building two packages -- one for the code, one for the docs + + If you want the docs, install twisted-docs too + + Feedback is encouraged about whether a 2.2-supporting version is needed + + -- Moshe Zadka Thu, 14 Mar 2002 07:24:07 +0200 + +twisted (0.15.5-1) unstable; urgency=low + + * New upstream release + + -- Moshe Zadka Fri, 8 Mar 2002 07:14:16 +0200 + +twisted (0.15.4-1) unstable; urgency=low + + * New upstream version + * Better DNS support + + -- Moshe Zadka Tue, 5 Mar 2002 13:54:37 +0200 + +twisted (0.15.3-1) unstable; urgency=low + + * New upstream release + * Fixed stupidproxy bug, where connections weren't closed + + -- Moshe Zadka Thu, 28 Feb 2002 21:07:28 +0200 + +twisted (0.15.1-1) unstable; urgency=low + + * New upstream release + + -- Moshe Zadka Tue, 12 Feb 2002 20:36:38 +0200 + +twisted (0.15.0-1) unstable; urgency=low + + * New upstream release + * IM application: many improvements, new GTK+ client + * easier to add error callbacks to deferred + * SOCKSv4 support + * bugs fixed in t.i.tcp + * added approveConnection (again ;-) + * All non-blocking methods now return deferreds instead of accepting + callbacks (hopefully) + * low-level protocol changes + * New t.web applications and features + * Perspective retrieval now async + * Enterprise now fixed + + -- Moshe Zadka Wed, 6 Feb 2002 14:38:38 +0200 + +twisted (0.13.0-1) unstable; urgency=low + + * New upstream version + * New forum + * New config interface + * New metrics + + -- Moshe Zadka Thu, 10 Jan 2002 20:04:30 +0200 + +twisted (0.12.2-1) unstable; urgency=low + + * New upstream versions (many bugfixes) + + -- Moshe Zadka Thu, 29 Nov 2001 08:01:23 +0200 + +twisted (0.12.1-1) unstable; urgency=low + + * New upstream version (mainly bugfixes) + + -- Moshe Zadka Thu, 22 Nov 2001 09:09:14 +0200 + +twisted (0.12.0-1) unstable; urgency=low + + * New upstream version + * Using Python 2.1 + + -- Moshe Zadka Wed, 21 Nov 2001 15:17:25 +0200 + +twisted (0.10.3-1) unstable; urgency=low + + * New upstream release + * twisted.names, resolving internet names + * optimizations + * works with Jython too + + -- Moshe Zadka Sun, 30 Sep 2001 23:46:45 +0200 + +twisted (0.10.2-1) unstable; urgency=low + + * New upstream release + * bug fixes + * timeouts for client sockets + * Tutorial about plugins + * Mail has changed API in an incompatible way + + -- Moshe Zadka Wed, 12 Sep 2001 23:00:59 +0300 + +twisted (0.10.1-1) unstable; urgency=low + + * New upstream release + * Massive renaming in prespective broker classes + * web proxying + * TCP connection forwarding + * Lots of new protocols: LDAP, finger and obscure RFCs + * --plugin option to twistd + * web widgets + * twisted.enterprise improved a lot + + -- Moshe Zadka Fri, 31 Aug 2001 06:49:00 +0300 + +twisted (0.10.0-1) unstable; urgency=low + + * New upstream release + * Added twisted.tap and twisted.mail to distribution + * Added docs about writing new twisted servers + * Changed mail API: now, saveMessage gets the SMTP from too + * Removed spurious prints from twisted.mail.mail + * Possible to relay mail to unknown domains via smart host + * tap2deb can create policy compliant Debian packages around .tap's + * Fixed debian/rules clean target (closes: Bug#108245) + * New arguments to twistd: --python, --no_save + * New arguments to mktap: --append + * twisted.tcp.Port can now change the size of the backlog from 5 + * UDP servers now possible + + -- Moshe Zadka Thu, 9 Aug 2001 09:37:03 +0300 + +twisted (0.9.4-1) unstable; urgency=low + + * Initial Release. (closes: #105843) + + -- Moshe Zadka Thu, 26 Jul 2001 21:09:53 +0300 --- twisted-words-8.2.0.orig/debian/rules +++ twisted-words-8.2.0/debian/rules @@ -0,0 +1,76 @@ +#! /usr/bin/make -f + +SHELL = /bin/bash + +# all versions +PYVERS := $(shell pyversions -vs) +VER := $(shell /usr/bin/python -c 'import sys; print sys.version[:3]') + +build: build-stamp +build-stamp: $(PYVERS:%=build-python%) + touch $@ +build-python%: + python$* setup.py build + touch $@ + +clean: + rm -rf *-stamp build-python* build + rm -rf $(addprefix debian/,$(packages)) debian/files debian/substvars + rm -rf _trial_temp test.log + find . -name "*.pyc" |xargs -r rm + dh_clean + +install: build-stamp install-prereq $(PYVERS:%=install-python%) install-nover + +install-prereq: build-stamp + dh_testdir + dh_testroot + dh_clean -k + +install-python%: install-prereq + : # python-twisted-words + python$* setup.py install --root=debian/python-twisted-words --install-layout=deb + -find debian/python-twisted-words -name '*.py[co]' | xargs rm -f + + : # Replace all '#!' calls to python with python + : # and make them executable + for i in `find debian/python-twisted-* -mindepth 3 -type f`; do \ + sed '1s,#!.*python[^ ]*\(.*\),#! /usr/bin/python\1,' \ + $$i > $$i.temp; \ + if cmp --quiet $$i $$i.temp; then \ + rm -f $$i.temp; \ + else \ + mv -f $$i.temp $$i; \ + chmod 755 $$i; \ + echo "fixed interpreter: $$i"; \ + fi; \ + done + +install-nover: + : # python-twisted-words + mkdir -p debian/python-twisted-words/usr/share/man/man1 + for i in doc/man/*.1; do \ + case "$$i" in doc/man/t-im.1) continue; esac; \ + cp -p $$i debian/python-twisted-words/usr/share/man/man1/; \ + done + +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs -i + dh_installdocs -i -A NEWS README + dh_installdocs -ppython-twisted-words doc/examples doc/howto + dh_installmenu -i + dh_compress -i -X.py + dh_fixperms -i + dh_pycentral -i + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +binary-arch: build install +# nothing to do + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install install-nover install-prereq --- twisted-words-8.2.0.orig/debian/copyright +++ twisted-words-8.2.0/debian/copyright @@ -0,0 +1,55 @@ +This package was debianized by Moshe Zadka +on Sat, 21 Jul 2001 09:35:33 +0300, +updated for 2.0 by Matthias Klose + +It was downloaded from http://www.twistedmatrix.com + +Copyright (c) 2004 +Allen Short +Andrew Bennetts +Benjamin Bruheim +Bob Ippolito +Christopher Armstrong +Donovan Preston +Itamar Shtull-Trauring +James Knight +Jason A. Mobarak +Jonathan Lange +Jonathan D. Simms +Jp Calderone +Jürgen Hermann +Kevin Turner +Mary Gardiner +Matthew Lefkowitz +Massachusetts Institute of Technology +Moshe Zadka +Paul Swartz +Pavel Pergamenshchik +Sean Riley +Travis B. Hartwell + +except as noted at the end of this file. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +Copyright Exceptions: + +No exceptions are listed in the upstream source. --- twisted-words-8.2.0.orig/debian/compat +++ twisted-words-8.2.0/debian/compat @@ -0,0 +1 @@ +4 --- twisted-words-8.2.0.orig/debian/watch +++ twisted-words-8.2.0/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://tmrc.mit.edu/mirror/twisted/Words/(\d\.\d)/ TwistedWords-([\d\.]*)\.tar\.bz2 --- twisted-words-8.2.0.orig/debian/python-twisted-words.menu +++ twisted-words-8.2.0/debian/python-twisted-words.menu @@ -0,0 +1,5 @@ +?package(python-twisted-words):\ + needs="x11"\ + section="Apps/Net"\ + title="Twisted Instance Messenger"\ + command="/usr/bin/im" --- twisted-words-8.2.0.orig/debian/control +++ twisted-words-8.2.0/debian/control @@ -0,0 +1,21 @@ +Source: twisted-words +Section: python +Priority: optional +Maintainer: Matthias Klose +Build-Depends: debhelper (>= 5.0.37.1), python-central (>= 0.6.7), python-all-dev, python-twisted-core (>= 8.2), patch +XS-Python-Version: all +Standards-Version: 3.8.0 + +Package: python-twisted-words +Architecture: all +Depends: ${python:Depends}, python-twisted-core (>= 8.2.0-2), python-openssl +Conflicts: python-twisted (<< 2.1), python2.3-twisted-words, python2.4-twisted-words +Replaces: python-twisted (<< 2.1), python2.3-twisted-words, python2.4-twisted-words +XB-Python-Version: ${python:Versions} +Description: Chat and Instant Messaging + Twisted Words includes: + - Low-level protocol implementations of OSCAR (AIM and ICQ), IRC, MSN, + TOC (AIM). + - Jabber libraries. + - Prototypes of chat server and client frameworks built on top + of the protocols. --- twisted-words-8.2.0.orig/twisted/words/protocols/msn.py +++ twisted-words-8.2.0/twisted/words/protocols/msn.py @@ -1,9 +1,7 @@ # -*- test-case-name: twisted.words.test -*- -# Copyright (c) 2001-2005 Twisted Matrix Laboratories. +# Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. -# - """ MSNP8 Protocol (client only) - semi-experimental @@ -18,7 +16,7 @@ You will want to subclass this and handle the gotNotificationReferral method appropriately. - + I{Notification Server} The NotificationClient class handles connections to the @@ -73,11 +71,12 @@ @author: Sam Jordan """ -import types, operator, os, md5 +import types, operator, os from random import randint from urllib import quote, unquote from twisted.python import failure, log +from twisted.python.hashlib import md5 from twisted.internet import reactor from twisted.internet.defer import Deferred from twisted.internet.protocol import ClientFactory @@ -185,7 +184,7 @@ class PassportNexus(HTTPClient): - + """ Used to obtain the URL of a valid passport login HTTPS server. @@ -330,7 +329,7 @@ If set to MESSAGE_ACK_NONE the server will do nothing. This is relevant for the return value of SwitchboardClient.sendMessage (which will return - a Deferred if ack is set to either MESSAGE_ACK or MESSAGE_NACK + a Deferred if ack is set to either MESSAGE_ACK or MESSAGE_NACK and will fire when the respective ACK or NACK is received). If set to MESSAGE_ACK_NONE sendMessage will return None. """ @@ -379,7 +378,7 @@ self.message = message class MSNContact: - + """ This class represents a contact (user). @@ -401,7 +400,7 @@ @ivar hasPager: Whether or not this user has a mobile pager (true=yes, false=no) """ - + def __init__(self, userHandle="", screenName="", lists=0, groups=[], status=None): self.userHandle = userHandle self.screenName = screenName @@ -856,7 +855,7 @@ def handle_CHL(self, params): checkParamLen(len(params), 2, 'CHL') self.sendLine("QRY %s msmsgs@msnmsgr.com 32" % self._nextTransactionID()) - self.transport.write(md5.md5(params[1] + MSN_CHALLENGE_STR).hexdigest()) + self.transport.write(md5(params[1] + MSN_CHALLENGE_STR).hexdigest()) def handle_QRY(self, params): pass @@ -1253,7 +1252,7 @@ a tuple with the new status code as the only element. """ - + id, d = self._createIDMapping() self.sendLine("CHG %s %s" % (id, status)) def _cb(r): @@ -1304,7 +1303,7 @@ the state as 'bl' which the official client interprets as -> allow messages from all users except those on the block list. - + @return: A Deferred, the callback of which will be fired when the server replies with the new privacy setting. The callback argument will be a tuple, the 2 elements @@ -1362,7 +1361,7 @@ # if lists are synchronized and updated correctly, which they # should be. If someone has a specific justified need for this # then please contact me and i'll re-enable/fix support for it. - + #def requestListGroups(self): # """ # Request (forward) list groups. @@ -1373,7 +1372,7 @@ # a dictionary mapping group IDs to group names and the # current list version. # """ - # + # # # this doesn't need to be used if syncing of the lists takes place (which it SHOULD!) # # i.e. please don't use it! # warnings.warn("Please do not use this method - use the list syncing process instead") @@ -1473,7 +1472,7 @@ the new list version (int), the group id (int) and the new group name (str). """ - + id, d = self._createIDMapping() self.sendLine("REG %s %s %s 0" % (id, groupID, quote(newName))) def _cb(r): @@ -1509,7 +1508,7 @@ version, and the group id (if relevant, otherwise it will be None) """ - + id, d = self._createIDMapping() listType = listIDToCode[listType].upper() if listType == "FL": @@ -1554,7 +1553,7 @@ version, and the group id (if relevant, otherwise it will be None) """ - + id, d = self._createIDMapping() listType = listIDToCode[listType].upper() if listType == "FL": @@ -1624,7 +1623,7 @@ After running the method the server is expected to close the connection. """ - + self.sendLine("OUT") class NotificationFactory(ClientFactory): @@ -2117,7 +2116,7 @@ self.state = 'CONNECTING' self.segmentLength = 0 self.buffer = '' - + if isinstance(file, types.StringType): path = os.path.join(directory, file) if os.path.exists(path) and not self.overwrite: @@ -2237,7 +2236,7 @@ @ivar auth: the auth cookie (number) to use when sending the transfer invitation """ - + def __init__(self, file): """ @param file: A string or file object represnting the file to send. --- twisted-words-8.2.0.orig/twisted/words/protocols/oscar.py +++ twisted-words-8.2.0/twisted/words/protocols/oscar.py @@ -1,5 +1,5 @@ # -*- test-case-name: twisted.words.test -*- -# Copyright (c) 2001-2005 Twisted Matrix Laboratories. +# Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. @@ -9,20 +9,17 @@ Maintainer: Paul Swartz """ -from __future__ import nested_scopes - -from twisted.internet import reactor, defer, protocol -from twisted.python import log - import struct -import md5 import string import socket import random -import time import types import re +from twisted.internet import reactor, defer, protocol +from twisted.python import log +from twisted.python.hashlib import md5 + def logPacketData(data): lines = len(data)/16 if lines*16 != len(data): lines=lines+1 @@ -62,9 +59,9 @@ return dict,data def encryptPasswordMD5(password,key): - m=md5.new() + m=md5() m.update(key) - m.update(md5.new(password).digest()) + m.update(md5(password).digest()) m.update("AOL Instant Messenger (SM)") return m.digest() --- twisted-words-8.2.0.orig/twisted/words/protocols/jabber/xmlstream.py +++ twisted-words-8.2.0/twisted/words/protocols/jabber/xmlstream.py @@ -42,8 +42,8 @@ """ Create a SHA1-digest string of a session identifier and password. """ - import sha - return sha.new("%s%s" % (sid, password)).hexdigest() + from twisted.python.hashlib import sha1 + return sha1("%s%s" % (sid, password)).hexdigest() --- twisted-words-8.2.0.orig/twisted/words/protocols/jabber/sasl_mechanisms.py +++ twisted-words-8.2.0/twisted/words/protocols/jabber/sasl_mechanisms.py @@ -1,16 +1,18 @@ # -*- test-case-name: twisted.words.test.test_jabbersaslmechanisms -*- # -# Copyright (c) 2001-2007 Twisted Matrix Laboratories. +# Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. """ Protocol agnostic implementations of SASL authentication mechanisms. """ -import md5, binascii, random, time, os +import binascii, random, time, os from zope.interface import Interface, Attribute, implements +from twisted.python.hashlib import md5 + class ISASLMechanism(Interface): name = Attribute("""Common name for the SASL Mechanism.""") @@ -178,7 +180,7 @@ """ def H(s): - return md5.new(s).digest() + return md5(s).digest() def HEX(n): return binascii.b2a_hex(n) @@ -221,4 +223,4 @@ def _gen_nonce(self): - return md5.new("%s:%s:%s" % (str(random.random()) , str(time.gmtime()),str(os.getpid()))).hexdigest() + return md5("%s:%s:%s" % (str(random.random()) , str(time.gmtime()),str(os.getpid()))).hexdigest() --- twisted-words-8.2.0.orig/twisted/words/test/test_oscar.py +++ twisted-words-8.2.0/twisted/words/test/test_oscar.py @@ -0,0 +1,24 @@ +# Copyright (c) 2008 Twisted Matrix Laboratories. +# See LICENSE for details. + +""" +Tests for L{twisted.words.protocols.oscar}. +""" + +from twisted.trial.unittest import TestCase + +from twisted.words.protocols.oscar import encryptPasswordMD5 + + +class PasswordTests(TestCase): + """ + Tests for L{encryptPasswordMD5}. + """ + def test_encryptPasswordMD5(self): + """ + L{encryptPasswordMD5} hashes the given password and key and returns a + string suitable to use to authenticate against an OSCAR server. + """ + self.assertEqual( + encryptPasswordMD5('foo', 'bar').encode('hex'), + 'd73475c370a7b18c6c20386bcf1339f2') --- twisted-words-8.2.0.orig/twisted/words/test/test_jabbercomponent.py +++ twisted-words-8.2.0/twisted/words/test/test_jabbercomponent.py @@ -5,9 +5,8 @@ Tests for L{twisted.words.protocols.jabber.component} """ -import sha - from twisted.python import failure +from twisted.python.hashlib import sha1 from twisted.trial import unittest from twisted.words.protocols.jabber import component, xmlstream from twisted.words.protocols.jabber.jid import JID @@ -50,7 +49,7 @@ handshake = self.output[-1] self.assertEquals('handshake', handshake.name) self.assertEquals('test:component', handshake.uri) - self.assertEquals(sha.new("%s%s" % ('12345', 'secret')).hexdigest(), + self.assertEquals(sha1("%s%s" % ('12345', 'secret')).hexdigest(), unicode(handshake)) # successful authentication @@ -80,7 +79,7 @@ xs.dataReceived("") # Calculate what we expect the handshake value to be - hv = sha.new("%s%s" % ("12345", "secret")).hexdigest() + hv = sha1("%s%s" % ("12345", "secret")).hexdigest() self.assertEquals(outlist[1], "%s" % (hv)) --- twisted-words-8.2.0.orig/twisted/words/test/test_msn.py +++ twisted-words-8.2.0/twisted/words/test/test_msn.py @@ -1,4 +1,4 @@ -# Copyright (c) 2001-2005 Twisted Matrix Laboratories. +# Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. """ @@ -6,7 +6,7 @@ """ # System imports -import StringIO, sys +import StringIO # Twisted imports @@ -24,6 +24,7 @@ from twisted.words.protocols import msn +from twisted.python.hashlib import md5 from twisted.protocols import loopback from twisted.internet.defer import Deferred from twisted.trial import unittest @@ -255,10 +256,35 @@ self._versionTest("VER 1 MSNP8\r\n") + def test_challenge(self): + """ + L{NotificationClient} responds to a I{CHL} message by sending a I{QRY} + back which included a hash based on the parameters of the I{CHL}. + """ + transport = StringIOWithoutClosing() + self.client.makeConnection(transport) + transport.seek(0) + transport.truncate() + + challenge = "15570131571988941333" + self.client.dataReceived('CHL 0 ' + challenge + '\r\n') + # md5 of the challenge and a magic string defined by the protocol + response = "8f2f5a91b72102cd28355e9fc9000d6e" + # Sanity check - the response is what the comment above says it is. + self.assertEqual( + response, md5(challenge + "Q1P7W2E4J9R8U3S5").hexdigest()) + self.assertEqual( + transport.getvalue(), + # 2 is the next transaction identifier. 32 is the length of the + # response. + "QRY 2 msmsgs@msnmsgr.com 32\r\n" + response) + + def testLogin(self): self.client.lineReceived('USR 1 OK foo@bar.com Test%20Screen%20Name 1 0') self.failUnless((self.client.state == 'LOGIN'), msg='Failed to detect successful login') + def testProfile(self): m = 'MSG Hotmail Hotmail 353\r\nMIME-Version: 1.0\r\nContent-Type: text/x-msmsgsprofile; charset=UTF-8\r\n' m += 'LoginTime: 1016941010\r\nEmailEnabled: 1\r\nMemberIdHigh: 40000\r\nMemberIdLow: -600000000\r\nlang_preference: 1033\r\n' --- twisted-words-8.2.0.orig/twisted/words/test/test_jabberclient.py +++ twisted-words-8.2.0/twisted/words/test/test_jabberclient.py @@ -1,11 +1,11 @@ -# Copyright (c) 2001-2007 Twisted Matrix Laboratories. +# Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.words.protocols.jabber.client} """ -import sha +from twisted.python.hashlib import sha1 from twisted.trial import unittest from twisted.words.protocols.jabber import client, error, jid, xmlstream from twisted.words.protocols.jabber.sasl import SASLInitiatingInitializer @@ -117,7 +117,7 @@ self.assertEquals(('jabber:iq:auth', 'query'), (iq.children[0].uri, iq.children[0].name)) self.assertEquals('user', unicode(iq.query.username)) - self.assertEquals(sha.new('12345secret').hexdigest(), + self.assertEquals(sha1('12345secret').hexdigest(), unicode(iq.query.digest)) self.assertEquals('resource', unicode(iq.query.resource))