diff -x .pc -Nur papyon-0.4.6/debian/changelog papyon-0.4.8/debian/changelog --- papyon-0.4.6/debian/changelog 2010-06-01 17:11:17.000000000 +0200 +++ papyon-0.4.8/debian/changelog 2010-06-01 17:12:36.000000000 +0200 @@ -1,3 +1,15 @@ +papyon (0.4.8-0ubuntu1) lucid-proposed; urgency=low + + * New upstream version: + - Fix contact not displaying because of a bad function name (lp: #553241) + * debian/patches/01_add_pycrypto_dep.diff, + debian/patches/90_git_no_b64_crasher.patch, + debian/patches/92_upstream_catch_exception.patch, + debian/patches/93_git_trailing_semicolons_crash.patch: + - the changes are in the new version + + -- Sebastien Bacher Tue, 01 Jun 2010 17:00:31 +0200 + papyon (0.4.6-0ubuntu2) lucid; urgency=low * debian/patches/93_git_trailing_semicolons_crash.patch: diff -x .pc -Nur papyon-0.4.6/debian/patches/series papyon-0.4.8/debian/patches/series --- papyon-0.4.6/debian/patches/series 2010-06-01 17:11:23.000000000 +0200 +++ papyon-0.4.8/debian/patches/series 2010-06-01 17:12:36.000000000 +0200 @@ -1,5 +1,2 @@ -01_add_pycrypto_dep.diff -90_git_no_b64_crasher.patch -#91_upstream_on_error_exception.patch -92_upstream_catch_exception.patch -93_git_trailing_semicolons_crash.patch +91_upstream_on_error_exception.patch + diff -x .pc -Nur papyon-0.4.6/NEWS papyon-0.4.8/NEWS --- papyon-0.4.6/NEWS 2010-04-08 13:14:47.000000000 +0200 +++ papyon-0.4.8/NEWS 2010-05-27 18:43:18.000000000 +0200 @@ -1,3 +1,24 @@ +papyon-0.4.8 (2010-05-27) +========================= + +The "Purple Python" release + +Fixes: + * Fix contact not displaying because of a bad function name (fd.o #28278) + +papyon-0.4.7 (2010-05-20) +========================= + +The "Red Wire" release + +Fixes: + * Deal with bad SHA1{C,D} in MSNObjects and log the failures. (fd.o#24138) + * Use python-crypto instead of an embedded copy of pyDes. (fd.o#26638) + * Signal an error in IOChannel if resolving fails. (fd.o#27554) + * Don't choke on trailing semicolons in message headers. (fd.o#27556) + * Allow receiving gzip-encoded soap responses (fd.o#27673) + * Work around invalid SHA1D attributes appearing in MSN objects (fd.o#27672) + papyon-0.4.6 (2010-04-08) ========================= diff -x .pc -Nur papyon-0.4.6/papyon/gnet/message/HTTP.py papyon-0.4.8/papyon/gnet/message/HTTP.py --- papyon-0.4.6/papyon/gnet/message/HTTP.py 2009-10-14 16:44:35.000000000 +0200 +++ papyon-0.4.8/papyon/gnet/message/HTTP.py 2010-05-06 19:28:09.000000000 +0200 @@ -77,7 +77,10 @@ #if "Content-Length" not in self.headers: # result.append("Content-Length: %d" % len(body)) result.append("") - result.append(str(self.body)) + if "Content-Encoding" in self.headers: + result.append("<" + self.headers.get('Content-Encoding', '') + " encoded data>") + else: + result.append(str(self.body)) return "\r\n".join(result) def __unicode__(self): diff -x .pc -Nur papyon-0.4.6/papyon/__init__.py papyon-0.4.8/papyon/__init__.py --- papyon-0.4.6/papyon/__init__.py 2010-04-08 13:14:47.000000000 +0200 +++ papyon-0.4.8/papyon/__init__.py 2010-05-27 18:43:18.000000000 +0200 @@ -26,7 +26,7 @@ @group Network Layer: gnet """ -version = (0, 4, 6) +version = (0, 4, 8) __version__ = ".".join(str(x) for x in version) __author__ = "Youness Alaoui " diff -x .pc -Nur papyon-0.4.6/papyon/p2p.py papyon-0.4.8/papyon/p2p.py --- papyon-0.4.6/papyon/p2p.py 2010-06-01 17:11:35.000000000 +0200 +++ papyon-0.4.8/papyon/p2p.py 2010-05-27 18:20:47.000000000 +0200 @@ -65,6 +65,30 @@ LOCATION = 14 "Location" +def _decode_shad(shad, warning=True): + try: + shad = base64.b64decode(shad) + except TypeError: + # See fd.o#27672 for details on this workaround. + if ' ' in shad: + parts = shad.split(' ') + + # Try the first part. + shad = _decode_shad(parts[0], False) + + # Try the second part. + if shad is None: + shad = _decode_shad(parts[1], False) + + else: + # Only display this warning if we're not in a nested call otherwise the + # warning will be confusing. + if warning: + logger.warning("Invalid SHA1D in MSNObject: %s" % shad) + shad = None + + return shad + class MSNObject(object): "Represents an MSNObject." def __init__(self, creator, size, typ, location, friendly, @@ -156,11 +180,7 @@ friendly = base64.b64decode(xml.unescape(element["Friendly"])) shad = element.get("SHA1D", None) if shad is not None: - try: - shad = base64.b64decode(shad) - except TypeError: - logger.warning("Invalid SHA1D in MSNObject: %s" % shad) - shad = None + shad = _decode_shad(shad) shac = element.get("SHA1C", None) if shac is not None: try: diff -x .pc -Nur papyon-0.4.6/papyon/service/AddressBook/address_book.py papyon-0.4.8/papyon/service/AddressBook/address_book.py --- papyon-0.4.6/papyon/service/AddressBook/address_book.py 2009-10-14 16:44:35.000000000 +0200 +++ papyon-0.4.8/papyon/service/AddressBook/address_book.py 2010-05-06 19:28:09.000000000 +0200 @@ -345,8 +345,8 @@ def delete_contact(self, contact, done_cb=None, failed_cb=None): def callback(): contact._remove_membership(Membership.FORWARD) - contact._reset() self.__common_callback('contact-deleted', done_cb, contact) + contact._reset() if contact.memberships == Membership.NONE: self.contacts.discard(contact) diff -x .pc -Nur papyon-0.4.6/papyon/service/ContentRoaming/storage.py papyon-0.4.8/papyon/service/ContentRoaming/storage.py --- papyon-0.4.6/papyon/service/ContentRoaming/storage.py 2009-10-14 16:44:35.000000000 +0200 +++ papyon-0.4.8/papyon/service/ContentRoaming/storage.py 2010-05-06 19:28:09.000000000 +0200 @@ -120,14 +120,14 @@ document_name = response.findtext('./st:Name') callback[0](document_rid, document_name, *callback[1:]) - @RequireSecurityTokens(LiveService.CONTACTS) + @RequireSecurityTokens(LiveService.STORAGE) def __soap_request(self, method, scenario, args, callback, errback): - token = str(self._tokens[LiveService.CONTACTS]) + token = str(self._tokens[LiveService.STORAGE]) self._soap_request(method, (scenario, token), args, callback, errback) - @RequireSecurityTokens(LiveService.CONTACTS) + @RequireSecurityTokens(LiveService.STORAGE) def get_display_picture(self, pre_auth_url, callback, errback): - token = str(self._tokens[LiveService.CONTACTS]) + token = str(self._tokens[LiveService.STORAGE]) scheme = 'http' host = 'byfiles.storage.msn.com' diff -x .pc -Nur papyon-0.4.6/papyon/service/description/SingleSignOn/RequestMultipleSecurityTokens.py papyon-0.4.8/papyon/service/description/SingleSignOn/RequestMultipleSecurityTokens.py --- papyon-0.4.6/papyon/service/description/SingleSignOn/RequestMultipleSecurityTokens.py 2009-10-14 16:44:35.000000000 +0200 +++ papyon-0.4.8/papyon/service/description/SingleSignOn/RequestMultipleSecurityTokens.py 2010-05-06 19:28:09.000000000 +0200 @@ -26,6 +26,7 @@ MESSENGER_CLEAR = ("messengerclear.live.com", "MBI_KEY_OLD") MESSENGER_SECURE = ("messengersecure.live.com", "MBI_SSL") SPACES = ("spaces.live.com", "MBI") + STORAGE = ("storage.msn.com", "MBI") TB = ("http://Passport.NET/tb", None) VOICE = ("voice.messenger.msn.com", "?id=69264") diff -x .pc -Nur papyon-0.4.6/papyon/service/__init__.py papyon-0.4.8/papyon/service/__init__.py --- papyon-0.4.6/papyon/service/__init__.py 2009-10-14 16:44:35.000000000 +0200 +++ papyon-0.4.8/papyon/service/__init__.py 2010-05-06 19:28:09.000000000 +0200 @@ -24,4 +24,4 @@ # import AddressBook # import OfflineIM -# import ContentRoaming +import ContentRoaming diff -x .pc -Nur papyon-0.4.6/papyon/service/SOAPService.py papyon-0.4.8/papyon/service/SOAPService.py --- papyon-0.4.6/papyon/service/SOAPService.py 2010-03-20 01:01:44.000000000 +0100 +++ papyon-0.4.8/papyon/service/SOAPService.py 2010-05-06 19:28:09.000000000 +0200 @@ -26,6 +26,7 @@ import papyon.gnet.protocol import papyon.util.element_tree as ElementTree import papyon.util.string_io as StringIO +import gzip import re import logging @@ -175,6 +176,7 @@ http_headers["Accept"] = "text/*" http_headers["Proxy-Connection"] = "Keep-Alive" http_headers["Connection"] = "Keep-Alive" + http_headers["Accept-Encoding"] = "gzip" request = compress_xml(soap_template % (soap_header, soap_body)) @@ -197,7 +199,20 @@ def _response_handler(self, transport, http_response): logger.debug("<<< " + unicode(http_response)) - soap_response = SOAPResponse(http_response.body) + + soap_response = "" + if "Content-Encoding" in http_response.headers: + if http_response.headers["Content-Encoding"] == "gzip": + body_stream = StringIO.StringIO(http_response.body) + unzipper = gzip.GzipFile(fileobj=body_stream) + unzipped_data = unzipper.read() + soap_response = SOAPResponse(unzipped_data) + elif http_response.headers["Content-Encoding"] == "": + soap_response = SOAPResponse(http_response.body) + else: + raise Exception("Invalid or unknown encoding") + else: + soap_response = SOAPResponse(http_response.body) request_id, callback, errback, user_data = self._unref_transport(transport) if not soap_response.is_valid(): diff -x .pc -Nur papyon-0.4.6/PKG-INFO papyon-0.4.8/PKG-INFO --- papyon-0.4.6/PKG-INFO 2010-04-08 13:17:15.000000000 +0200 +++ papyon-0.4.8/PKG-INFO 2010-05-27 18:50:19.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: papyon -Version: 0.4.6 +Version: 0.4.8 Summary: Python msn client library Home-page: http://telepathy.freedesktop.org/wiki/Papyon Author: Youness Alaoui