From 7570e200631d9137d5dad410231419d889a3a42a Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 13 Oct 2012 05:33:03 -0400 Subject: [PATCH] Require urclib 3.2.2. Has a "fix" for the UnicodeDecodeError problem. Alas, the fix violates RFC2812. --- NEWS | 3 +++ install.txt | 2 +- irkerd | 14 ++------------ 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/NEWS b/NEWS index 0b70edf..aca1759 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ irker history +1.13 @ + The IRC library at version 3.2 or later is required for this version! + 1.12 @ 2012-10-11 Emergency workaround for a Unicode-handling error buried deep in irclib. The IRC library at version 3.2 or later is required for this version! diff --git a/install.txt b/install.txt index d98fa4e..9a0d320 100644 --- a/install.txt +++ b/install.txt @@ -28,7 +28,7 @@ You should *not* make irker visible from outside the site firewall, as it can be used to spam IRC channels while masking the source address. You will need to have Jason Coombs's irc library where Python can see -it. See ; use version 3.2 or later, +it. See ; use version 3.2.2 or later, not 3.0 or the even older code from SourceForge. The file org.catb.irkerd.plist is a Mac OS/X plist that can be diff --git a/irkerd b/irkerd index ed92efc..9f00833 100755 --- a/irkerd +++ b/irkerd @@ -19,7 +19,7 @@ Design and code by Eric S. Raymond . See the project resource page at . Requires Python 2.6 or 2.5 with the simplejson library installed, and -the irc client library at version >= 3.2: see +the irc client library at version >= 3.2.2: see http://pypi.python.org/pypi/irc/ """ @@ -364,7 +364,7 @@ class Irker: self.irc.add_global_handler("featurelist", self._handle_features) self.irc.add_global_handler("disconnect", self._handle_disconnect) self.irc.add_global_handler("kick", self._handle_kick) - thread = threading.Thread(target=self.process_forever) + thread = threading.Thread(target=self.irc.process_forever) thread.setDaemon(True) self.irc._thread = thread thread.start() @@ -376,16 +376,6 @@ class Irker: "Debugging information." if self.debuglevel >= level: sys.stderr.write("irkerd: %s\n" % errmsg) - def process_forever(self, timeout=0.2): - "Shim - can be removed later." - # Kluge to get around the fact that 3.2 and older library - # versions do a Unicode decode where they shouldn't. - self.debug(1, "process_forever(timeout=%s)" % timeout) - while True: - try: - self.irc.process_once(timeout) - except UnicodeDecodeError: - pass def _handle_ping(self, connection, _event): "PING arrived, bump the last-received time for the connection." if connection.context: -- 2.26.2