[gwibber/f12/master] update to 2.31.92

Tom Callaway spot at fedoraproject.org
Fri Sep 3 19:06:01 UTC 2010


commit daa1b6eb9ffcac6bf163fea0c70fabb2a4d43739
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date:   Fri Sep 3 15:06:05 2010 -0400

    update to 2.31.92

 gwibber-838bzr-twitter-unicode-hack.patch |   57 +++++++++++++++++++++++++++++
 gwibber.spec                              |   15 ++++----
 sources                                   |    2 +-
 3 files changed, 65 insertions(+), 9 deletions(-)
---
diff --git a/gwibber-838bzr-twitter-unicode-hack.patch b/gwibber-838bzr-twitter-unicode-hack.patch
new file mode 100644
index 0000000..8f0de5f
--- /dev/null
+++ b/gwibber-838bzr-twitter-unicode-hack.patch
@@ -0,0 +1,57 @@
+diff -up gwibber-838bzr/gwibber/microblog/twitter.py.gwibber-unicode-hack gwibber-838bzr/gwibber/microblog/twitter.py
+--- gwibber-838bzr/gwibber/microblog/twitter.py.gwibber-unicode-hack	2010-09-03 11:15:11.000000000 -0400
++++ gwibber-838bzr/gwibber/microblog/twitter.py	2010-09-03 11:17:46.691625005 -0400
+@@ -52,6 +52,44 @@ PROTOCOL_INFO = {
+ URL_PREFIX = "https://twitter.com"
+ API_PREFIX = "https://api.twitter.com/1"
+ 
++import htmlentitydefs
++import unicodedata
++
++def htmlStripEscapes(s):
++    """Replace all html entities (escape sequences) in the string s with their
++    ISO Latin-1 (or bytecode) equivalent.  If no such equivalent can be found
++    then the entity is decomposed into its normal form and the constituent
++    latin characters are retained.  Failing that, the entity is deleted."""
++    i=0
++    while True:
++        i = s.find('&',i)
++        j = s.find(';',i)+1
++        identifier = s[i+1:j-1]
++        if not j==0:
++            replacement = ''
++            if identifier in htmlentitydefs.entitydefs:
++                identifier = htmlentitydefs.entitydefs[identifier]
++                if len(identifier)==1:
++                    replacement = identifier
++                else:
++                    identifier = identifier.strip('&;')
++            if (len(identifier)>1) and (identifier[0] == '#'):
++                identifier = identifier[1:]
++                if identifier[0]=='x':
++                    identifier = int('0'+identifier,16)
++                else:
++                    identifier = int(identifier)
++                if identifier<256:
++                    replacement = chr(identifier)
++                elif identifier<=0xFFFF:
++                    replacement = unicodedata.normalize('NFKD',
++                        unichr(identifier)).encode('latin_1','ignore')
++            s = s[:i] + replacement + s[j:]
++            i += len(replacement)
++        else:
++            break
++    return(s)
++
+ def unescape(s):
+   p = htmllib.HTMLParser(None)
+   p.save_bgn()
+@@ -75,7 +113,7 @@ class Client:
+       m["service"] = "twitter"
+       m["account"] = self.account["id"]
+       m["time"] = util.parsetime(data["created_at"])
+-      m["text"] = unescape(data["text"])
++      m["text"] = unescape(htmlStripEscapes(data["text"]))
+       m["to_me"] = ("@%s" % self.account["username"]) in data["text"]
+ 
+       m["html"] = util.linkify(data["text"],
diff --git a/gwibber.spec b/gwibber.spec
index 3fbd3f8..6870bf7 100644
--- a/gwibber.spec
+++ b/gwibber.spec
@@ -1,7 +1,7 @@
  %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
-%global basever 2.31.91
-%global bzr_rev 832
+%global basever 2.31.92
+%global bzr_rev 838
 
 Name:           gwibber
 Version:        %{basever}
@@ -19,12 +19,9 @@ URL:            https://launchpad.net/gwibber
 Source0:	gwibber-%{bzr_rev}bzr.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-# Cleanup facebook auth dialog
-Patch0:		gwibber-819bzr-cleanup-fbauth.patch
-
 # Gwibber unicode hack
 # See: https://bugs.launchpad.net/gwibber/+bug/532952
-Patch1:		gwibber-825bzr-twitter-unicode-hack.patch
+Patch1:		gwibber-838bzr-twitter-unicode-hack.patch
 
 # Disable libproxy support
 # It doesn't work for some unknown reason.
@@ -40,7 +37,7 @@ Patch4:		gwibber-794bzr-quit-when-minimized.patch
 # https://bugs.launchpad.net/gwibber/+bug/624918
 Patch5:		gwibber-825bzr-threads-gone-wild.patch
 
-# Move twitter to oauth
+# Oauth bits
 Patch6:		gwibber-832bzr-twitter-oauth.patch
 
 Requires:	libsoup, python-pycurl, PyXML
@@ -71,7 +68,6 @@ and GTK. It supports Twitter, Jaiku, Identi.ca, Facebook, and Digg.
 
 %prep
 %setup -q -n gwibber-%{bzr_rev}bzr
-%patch0 -p1 -b .fbauth
 %patch1 -p1 -b .gwibber-unicode-hack
 %patch2 -p1 -b .no-libproxy
 %patch3 -p1 -b .no-position-printing
@@ -121,6 +117,9 @@ rm -rf %{buildroot}
 %{_datadir}/indicators/messages/applications/gwibber
 
 %changelog
+* Fri Sep  3 2010 Tom "spot" Callaway <tcallawa at redhat.com> - 1:2.31.92-1.838bzr
+- update to 2.31.92 (838bzr)
+
 * Tue Aug 31 2010 Tom "spot" Callaway <tcallawa at redhat.com> - 1:2.31.91-1.832bzr
 - update to 2.31.91 (832bzr)
 - move twitter to oauth
diff --git a/sources b/sources
index 0087326..047cb81 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b43b5b7f09e5d58bc3c1452455c822df  gwibber-832bzr.tar.gz
+4cf08e1265c53741e1c4a15e50830af2  gwibber-838bzr.tar.gz


More information about the scm-commits mailing list