[Python-modules-commits] r8255 - in packages/python-whoosh/trunk/debian/patches (1 file)
odd_bloke-guest at users.alioth.debian.org
odd_bloke-guest at users.alioth.debian.org
Tue Apr 14 12:41:57 UTC 2009
Date: Tuesday, April 14, 2009 @ 12:41:57
Author: odd_bloke-guest
Revision: 8255
Yet more Python 2.4 fixes.
Modified:
packages/python-whoosh/trunk/debian/patches/02-python2.4-fixes.diff
Modified: packages/python-whoosh/trunk/debian/patches/02-python2.4-fixes.diff
===================================================================
--- packages/python-whoosh/trunk/debian/patches/02-python2.4-fixes.diff 2009-04-14 11:38:30 UTC (rev 8254)
+++ packages/python-whoosh/trunk/debian/patches/02-python2.4-fixes.diff 2009-04-14 12:41:57 UTC (rev 8255)
@@ -1,7 +1,19 @@
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
++++ Whoosh-0.1.13/src/whoosh/query.py 2009-04-14 12:41:36.000000000 +0100
+@@ -24,10 +24,10 @@
+ from __future__ import division
+ from array import array
+ from bisect import bisect_left, bisect_right
+-from collections import defaultdict
+ import fnmatch, re
+
+ from whoosh.support.bitvector import BitVector
++from whoosh.support.defaultdict import defaultdict
+ from whoosh.lang.morph_en import variations
+
+ # Utility functions
@@ -899,8 +899,13 @@
slop = self.slop, boost = self.boost)
@@ -64,20 +76,25 @@
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 @@
++++ Whoosh-0.1.13/src/whoosh/classify.py 2009-04-14 12:42:34.000000000 +0100
+@@ -17,10 +17,11 @@
"""Classes and functions for classifying and extracting information from documents.
"""
-from __future__ import division, with_statement
+-from collections import defaultdict
+from __future__ import division
- from collections import defaultdict
from math import log
++from whoosh.support.defaultdict import defaultdict
++
+
+ # Expansion models
+
Index: Whoosh-0.1.13/src/whoosh/fields.py
===================================================================
--- Whoosh-0.1.13.orig/src/whoosh/fields.py 2009-04-14 12:16:13.000000000 +0100
-+++ Whoosh-0.1.13/src/whoosh/fields.py 2009-04-14 12:36:20.000000000 +0100
++++ Whoosh-0.1.13/src/whoosh/fields.py 2009-04-14 12:47:02.000000000 +0100
@@ -20,9 +20,8 @@
"""
@@ -89,20 +106,15 @@
# Exceptions
-@@ -31,6 +30,16 @@
+@@ -31,6 +30,11 @@
class UnknownFieldError(Exception):
pass
+try:
+ any
+except:
-+ def any(iterable):
-+ for element in iterable:
-+ if element:
-+ return True
-+ return False
++ from whoosh.support.any import any
+
-+
# Field Types
class FieldType(object):
@@ -185,3 +197,83 @@
def wrapper(self, *args, **kwargs):
if self.is_closed:
raise Exception("This object has been closed")
+Index: Whoosh-0.1.13/src/whoosh/spelling.py
+===================================================================
+--- Whoosh-0.1.13.orig/src/whoosh/spelling.py 2009-04-14 12:41:48.000000000 +0100
++++ Whoosh-0.1.13/src/whoosh/spelling.py 2009-04-14 12:42:04.000000000 +0100
+@@ -18,9 +18,8 @@
+ as a backend for a spell-checking engine.
+ """
+
+-from collections import defaultdict
+-
+ from whoosh import analysis, fields, query, searching, writing
++from whoosh.support.defaultdict import defaultdict
+ from whoosh.support.levenshtein import relative, distance
+
+ class SpellChecker(object):
+Index: Whoosh-0.1.13/src/whoosh/highlight.py
+===================================================================
+--- Whoosh-0.1.13.orig/src/whoosh/highlight.py 2009-04-14 12:47:54.000000000 +0100
++++ Whoosh-0.1.13/src/whoosh/highlight.py 2009-04-14 12:48:15.000000000 +0100
+@@ -17,6 +17,11 @@
+ from __future__ import division
+ from heapq import nlargest
+
++try:
++ any
++except:
++ from whoosh.support.any import any
++
+
+ # Fragment object
+
+Index: Whoosh-0.1.13/src/whoosh/index.py
+===================================================================
+--- Whoosh-0.1.13.orig/src/whoosh/index.py 2009-04-14 12:47:31.000000000 +0100
++++ Whoosh-0.1.13/src/whoosh/index.py 2009-04-14 12:47:49.000000000 +0100
+@@ -26,6 +26,11 @@
+
+ from whoosh import fields, store
+
++try:
++ any
++except:
++ from whoosh.support.any import any
++
+
+ _DEF_INDEX_NAME = "MAIN"
+ _EXTENSIONS = "dci|dcz|tiz|fvz"
+Index: Whoosh-0.1.13/src/whoosh/reading.py
+===================================================================
+--- Whoosh-0.1.13.orig/src/whoosh/reading.py 2009-04-14 12:47:09.000000000 +0100
++++ Whoosh-0.1.13/src/whoosh/reading.py 2009-04-14 12:47:25.000000000 +0100
+@@ -25,6 +25,11 @@
+ from whoosh.util import ClosableMixin, protected
+ from whoosh.fields import FieldConfigurationError, UnknownFieldError
+
++try:
++ any
++except:
++ from whoosh.support.any import any
++
+ # Exceptions
+
+ class TermNotFound(Exception):
+@@ -642,4 +647,4 @@
+
+
+
+-
+\ No newline at end of file
++
+Index: Whoosh-0.1.13/src/whoosh/support/any.py
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ Whoosh-0.1.13/src/whoosh/support/any.py 2009-04-14 12:46:45.000000000 +0100
+@@ -0,0 +1,5 @@
++def any(iterable):
++ for element in iterable:
++ if element:
++ return True
++ return False
More information about the Python-modules-commits
mailing list