[Python-modules-commits] r8253 - in packages/python-whoosh/trunk/debian (3 files)

odd_bloke-guest at users.alioth.debian.org odd_bloke-guest at users.alioth.debian.org
Tue Apr 14 11:05:44 UTC 2009


    Date: Tuesday, April 14, 2009 @ 11:05:43
  Author: odd_bloke-guest
Revision: 8253

Support Python 2.4.

Added:
  packages/python-whoosh/trunk/debian/patches/02-python2.4-fixes.diff
Modified:
  packages/python-whoosh/trunk/debian/control
  packages/python-whoosh/trunk/debian/patches/series

Modified: packages/python-whoosh/trunk/debian/control
===================================================================
--- packages/python-whoosh/trunk/debian/control	2009-04-13 23:44:46 UTC (rev 8252)
+++ packages/python-whoosh/trunk/debian/control	2009-04-14 11:05:43 UTC (rev 8253)
@@ -9,7 +9,6 @@
 Homepage: http://whoosh.ca/
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-whoosh/trunk/
 Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/python-whoosh/trunk/
-XS-Python-Version: >=2.5
 
 Package: python-whoosh
 Architecture: all

Added: packages/python-whoosh/trunk/debian/patches/02-python2.4-fixes.diff
===================================================================
--- packages/python-whoosh/trunk/debian/patches/02-python2.4-fixes.diff	                        (rev 0)
+++ packages/python-whoosh/trunk/debian/patches/02-python2.4-fixes.diff	2009-04-14 11:05:43 UTC (rev 8253)
@@ -0,0 +1,76 @@
+Index: Whoosh-0.1.13/src/whoosh/query.py
+===================================================================
+--- Whoosh-0.1.13.orig/src/whoosh/query.py	2009-04-14 11:44:30.000000000 +0100
++++ Whoosh-0.1.13/src/whoosh/query.py	2009-04-14 11:46:16.000000000 +0100
+@@ -899,8 +899,13 @@
+                               slop = self.slop, boost = self.boost)
+     
+     def replace(self, oldtext, newtext):
+-        return Phrase(self.fieldname, [newtext if w == oldtext else w
+-                                       for w in self.words],
++        words = []
++        for w in self.words:
++            if w == oldtext:
++                words.append(newtext)
++            else:
++                words.append(w)
++        return Phrase(self.fieldname, words,
+                                        slop = self.slop, boost = self.boost)
+     
+     def _and_query(self):
+Index: Whoosh-0.1.13/src/whoosh/support/bitvector.py
+===================================================================
+--- Whoosh-0.1.13.orig/src/whoosh/support/bitvector.py	2009-04-14 11:50:01.000000000 +0100
++++ Whoosh-0.1.13/src/whoosh/support/bitvector.py	2009-04-14 11:51:54.000000000 +0100
+@@ -53,8 +53,13 @@
+     
+     def __str__(self):
+         get = self.__getitem__
+-        return "".join("1" if get(i) else "0"
+-                       for i in xrange(0, self.size)) 
++        x = []
++        for i in xrange(0, self.size):
++            if get(i):
++                x.append("1")
++            else:
++                x.append("0")
++        return "".join(x)
+     
+     def __getitem__(self, index):
+         return self.bits[index >> 3] & (1 << (index & 7)) != 0
+@@ -127,4 +132,4 @@
+     
+     
+     
+-    
+\ No newline at end of file
++    
+Index: Whoosh-0.1.13/src/whoosh/lang/morph_en.py
+===================================================================
+--- Whoosh-0.1.13.orig/src/whoosh/lang/morph_en.py	2009-04-14 11:52:20.000000000 +0100
++++ Whoosh-0.1.13/src/whoosh/lang/morph_en.py	2009-04-14 11:53:12.000000000 +0100
+@@ -900,7 +900,10 @@
+             # positional groups are None)
+             groups = [g for g in match.groups() if g is not None]
+             ending = groups[-1]
+-            root = word[:0-len(ending)] if ending else word 
++            if ending:
++                root = word[:0-len(ending)]
++            else:
++                root = word
+ 
+             out = set((word, ))
+             results = rules[i * _partition_size + num][1]
+Index: Whoosh-0.1.13/src/whoosh/classify.py
+===================================================================
+--- Whoosh-0.1.13.orig/src/whoosh/classify.py	2009-04-14 12:03:07.000000000 +0100
++++ Whoosh-0.1.13/src/whoosh/classify.py	2009-04-14 12:03:14.000000000 +0100
+@@ -17,7 +17,7 @@
+ """Classes and functions for classifying and extracting information from documents.
+ """
+ 
+-from __future__ import division, with_statement
++from __future__ import division
+ from collections import defaultdict
+ from math import log
+ 

Modified: packages/python-whoosh/trunk/debian/patches/series
===================================================================
--- packages/python-whoosh/trunk/debian/patches/series	2009-04-13 23:44:46 UTC (rev 8252)
+++ packages/python-whoosh/trunk/debian/patches/series	2009-04-14 11:05:43 UTC (rev 8253)
@@ -1 +1,2 @@
 01-remove-pyparsing.diff
+02-python2.4-fixes.diff




More information about the Python-modules-commits mailing list