[Python-apps-commits] r14409 - in packages/spambayes/trunk/debian (4 files)
hle at users.alioth.debian.org
hle at users.alioth.debian.org
Sat Oct 7 08:09:16 UTC 2017
Date: Saturday, October 7, 2017 @ 08:09:15
Author: hle
Revision: 14409
* Upload to unstable (Closes: #876622).
* Modify debian/patches/asyncore.patch:
Instead of importing incompatible asyncore and asynchat modules from
Python, remove affected functionalities (Closes: #785503).
* Bump Standards-Version to 4.1.1.
Modified:
packages/spambayes/trunk/debian/changelog
packages/spambayes/trunk/debian/control
packages/spambayes/trunk/debian/patches/asyncore.patch
packages/spambayes/trunk/debian/patches/series
Modified: packages/spambayes/trunk/debian/changelog
===================================================================
--- packages/spambayes/trunk/debian/changelog 2017-10-06 20:49:24 UTC (rev 14408)
+++ packages/spambayes/trunk/debian/changelog 2017-10-07 08:09:15 UTC (rev 14409)
@@ -1,3 +1,13 @@
+spambayes (1.1b1-4) unstable; urgency=medium
+
+ * Upload to unstable (Closes: #876622).
+ * Modify debian/patches/asyncore.patch:
+ Instead of importing incompatible asyncore and asynchat modules from
+ Python, remove affected functionalities (Closes: #785503).
+ * Bump Standards-Version to 4.1.1.
+
+ -- Hugo Lefeuvre <hle at debian.org> Sat, 07 Oct 2017 09:56:27 +0200
+
spambayes (1.1b1-3) experimental; urgency=medium
* Fix things broken by the pybuild port:
Modified: packages/spambayes/trunk/debian/control
===================================================================
--- packages/spambayes/trunk/debian/control 2017-10-06 20:49:24 UTC (rev 14408)
+++ packages/spambayes/trunk/debian/control 2017-10-07 08:09:15 UTC (rev 14409)
@@ -9,7 +9,7 @@
python-lockfile (>= 1:0.10),
dh-python,
rename
-Standards-Version: 3.9.8
+Standards-Version: 4.1.1
X-Python-Version: >= 2.6
Homepage: http://spambayes.sourceforge.net
Vcs-Svn: svn://anonscm.debian.org/python-apps/packages/spambayes/trunk/
Modified: packages/spambayes/trunk/debian/patches/asyncore.patch
===================================================================
--- packages/spambayes/trunk/debian/patches/asyncore.patch 2017-10-06 20:49:24 UTC (rev 14408)
+++ packages/spambayes/trunk/debian/patches/asyncore.patch 2017-10-07 08:09:15 UTC (rev 14409)
@@ -1,14 +1,68 @@
-Fixes an error when importing asyncore and asynchat.
-Index: spambayes-1.1b1/spambayes/Dibbler.py
-===================================================================
---- spambayes-1.1b1.orig/spambayes/Dibbler.py 2011-01-22 16:15:06.000000000 +0100
-+++ spambayes-1.1b1/spambayes/Dibbler.py 2014-06-13 13:17:48.798261574 +0200
-@@ -183,7 +183,7 @@
- RSTRIP_CHARS_AVAILABLE = True
-
+--- a/spambayes/Dibbler.py 2011-01-22 16:15:06.000000000 +0100
++++ b/spambayes/Dibbler.py 2017-10-07 10:05:26.280110961 +0200
+@@ -185,46 +185,6 @@
from spambayes.port import md5
--from spambayes import asyncore, asynchat
-+import asyncore, asynchat
+ from spambayes import asyncore, asynchat
- class BrighterAsyncChat(asynchat.async_chat):
- """An asynchat.async_chat that doesn't give spurious warnings on
+-class BrighterAsyncChat(asynchat.async_chat):
+- """An asynchat.async_chat that doesn't give spurious warnings on
+- receiving an incoming connection, lets SystemExit cause an exit, can
+- flush its output, and will correctly remove itself from a non-default
+- socket map on `close()`."""
+-
+- def __init__(self, conn=None, map=None):
+- """See `asynchat.async_chat`."""
+- asynchat.async_chat.__init__(self, conn)
+- self.__map = map
+- self._closed = False
+-
+- def handle_connect(self):
+- """Suppresses the asyncore "unhandled connect event" warning."""
+- pass
+-
+- def handle_error(self):
+- """Let SystemExit cause an exit."""
+- type, v, t = sys.exc_info()
+- if type == SystemExit:
+- raise
+- else:
+- asynchat.async_chat.handle_error(self)
+-
+- def flush(self):
+- """Flush everything in the output buffer."""
+- # We check self._closed here because of the case where
+- # self.initiate_send() raises an exception, causing self.close()
+- # to be called. If we didn't check, we could end up in an infinite
+- # loop.
+- while (self.producer_fifo or self.ac_out_buffer) and not self._closed:
+- self.initiate_send()
+-
+- def close(self):
+- """Remove this object from the correct socket map."""
+- self._closed = True
+- self.del_channel(self.__map)
+- self.socket.close()
+-
+-
+ class Context:
+ """See the main documentation for details of `Dibbler.Context`."""
+ def __init__(self, asyncMap=asyncore.socket_map):
+@@ -355,7 +315,7 @@
+ return "You must log in."
+
+
+-class _HTTPHandler(BrighterAsyncChat):
++class _HTTPHandler(asynchat.async_chat):
+ """This is a helper for the HTTP server class - one of these is created
+ for each incoming request, and does the job of decoding the HTTP traffic
+ and driving the plugins."""
+@@ -367,8 +327,7 @@
+ def __init__(self, clientSocket, server, context):
+ # Grumble: asynchat.__init__ doesn't take a 'map' argument,
+ # hence the two-stage construction.
+- BrighterAsyncChat.__init__(self, map=context._map)
+- BrighterAsyncChat.set_socket(self, clientSocket, context._map)
++ asynchat.async_chat.__init__(self, clientSocket, context._map)
+ self._context = context
+ self._server = server
+ self._request = ''
Modified: packages/spambayes/trunk/debian/patches/series
===================================================================
--- packages/spambayes/trunk/debian/patches/series 2017-10-06 20:49:24 UTC (rev 14408)
+++ packages/spambayes/trunk/debian/patches/series 2017-10-07 08:09:15 UTC (rev 14409)
@@ -1,4 +1,4 @@
+asyncore.patch
lockfile.patch
gnus_fix.patch
paths_fix.patch
-asyncore.patch
More information about the Python-apps-commits
mailing list