[Python-apps-team] Bug#789564: Compatibility with newer python-lockfile
Jeff Epler
jepler at unpythonic.net
Thu Jul 2 13:20:11 UTC 2015
tags 789564 + patch
thanks
As far as I can tell, spambayes uses lockfile.FileLock, a name which is
still provided by python-lockfile-0.10.2-2. As such it doesn't need to
be changed.
However, that said, I have produced a patch that follows the gratuitous
renaming of the main lockfile API.
diff -Nru spambayes-1.1b1/debian/changelog spambayes-1.1b1/debian/changelog
--- spambayes-1.1b1/debian/changelog 2014-06-13 07:25:16.000000000 -0500
+++ spambayes-1.1b1/debian/changelog 2015-07-02 08:10:33.000000000 -0500
@@ -1,3 +1,10 @@
+spambayes (1.1b1-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Compatibility with newer python-lockfile (>> 0.10) (closes: #789564)
+
+ -- <jepler at unpythonic.net> Thu, 02 Jul 2015 08:09:11 -0500
+
spambayes (1.1b1-1) unstable; urgency=low
[ Jakub Wilk ]
diff -Nru spambayes-1.1b1/debian/control spambayes-1.1b1/debian/control
--- spambayes-1.1b1/debian/control 2014-06-13 04:44:44.000000000 -0500
+++ spambayes-1.1b1/debian/control 2015-07-02 08:10:27.000000000 -0500
@@ -6,7 +6,7 @@
Build-Depends: debhelper (>= 7.0.50),
python (>=2.6.6-3~),
python-setuptools,
- python-lockfile
+ python-lockfile (>= 1:0.10)
Standards-Version: 3.9.5
X-Python-Version: >= 2.6
Homepage: http://spambayes.sourceforge.net
diff -Nru spambayes-1.1b1/debian/patches/lockfile.patch spambayes-1.1b1/debian/patches/lockfile.patch
--- spambayes-1.1b1/debian/patches/lockfile.patch 1969-12-31 18:00:00.000000000 -0600
+++ spambayes-1.1b1/debian/patches/lockfile.patch 2015-07-02 08:13:40.000000000 -0500
@@ -0,0 +1,38 @@
+Description: Compatibility with newer python-lockfile
+ Follow the gratuitous renaming of the main python-lockfile API.
+ .
+ spambayes (1.1b1-1.1) UNRELEASED; urgency=medium
+ .
+ * Non-maintainer upload.
+ * Compatibility with python-lockfile (>> 0.10) (closes: #789564)
+Author: <jepler at unpythonic.net>
+Bug-Debian: https://bugs.debian.org/789564
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Forwarded: no
+Last-Update: 2015-07-02
+
+--- spambayes-1.1b1.orig/spambayes/safepickle.py
++++ spambayes-1.1b1/spambayes/safepickle.py
+@@ -10,7 +10,7 @@ from spambayes.Options import options
+
+ def pickle_read(filename):
+ """Read pickle file contents with a lock."""
+- lock = lockfile.FileLock(filename)
++ lock = lockfile.LockFile(filename)
+ lock.acquire(timeout=20)
+ try:
+ return pickle.load(open(filename, 'rb'))
+@@ -20,7 +20,7 @@ def pickle_read(filename):
+ def pickle_write(filename, value, protocol=0):
+ '''Store value as a pickle without creating corruption'''
+
+- lock = lockfile.FileLock(filename)
++ lock = lockfile.LockFile(filename)
+ lock.acquire(timeout=20)
+
+ try:
diff -Nru spambayes-1.1b1/debian/patches/series spambayes-1.1b1/debian/patches/series
--- spambayes-1.1b1/debian/patches/series 2014-06-13 06:19:41.000000000 -0500
+++ spambayes-1.1b1/debian/patches/series 2015-07-02 08:11:12.000000000 -0500
@@ -1,3 +1,4 @@
gnus_fix.patch
paths_fix.patch
asyncore.patch
+lockfile.patch
More information about the Python-apps-team
mailing list