[Python-modules-commits] r15845 - in packages/python-whoosh/trunk/debian/patches (3 files)
aelmahmoudy-guest at users.alioth.debian.org
aelmahmoudy-guest at users.alioth.debian.org
Tue Feb 22 19:40:32 UTC 2011
Date: Tuesday, February 22, 2011 @ 19:40:25
Author: aelmahmoudy-guest
Revision: 15845
* New upstream release.
* Removed fix_methodcaller_import.diff and fix_test_colonspace.diff patches,
as they are applied upstream.
Modified:
packages/python-whoosh/trunk/debian/patches/series
Deleted:
packages/python-whoosh/trunk/debian/patches/fix_methodcaller_import.diff
packages/python-whoosh/trunk/debian/patches/fix_test_colonspace.diff
Deleted: packages/python-whoosh/trunk/debian/patches/fix_methodcaller_import.diff
===================================================================
--- packages/python-whoosh/trunk/debian/patches/fix_methodcaller_import.diff 2011-02-22 18:58:20 UTC (rev 15844)
+++ packages/python-whoosh/trunk/debian/patches/fix_methodcaller_import.diff 2011-02-22 19:40:25 UTC (rev 15845)
@@ -1,60 +0,0 @@
-Description: Fixed import of methodcaller, which was only added in Python 2.6.
-Origin: https://bitbucket.org/mchaput/whoosh/changeset/8a5a6ee1c272
-Author: Matt Chaput <matt at whoosh.ca>
-Bug: https://bitbucket.org/mchaput/whoosh/issue/110
-
---- a/src/whoosh/query.py
-+++ b/src/whoosh/query.py
-@@ -22,7 +22,6 @@
-
- import copy
- import fnmatch
--import operator
- import re
- from array import array
-
-@@ -35,7 +34,7 @@
- from whoosh.reading import TermNotFound
- from whoosh.support.levenshtein import relative
- from whoosh.support.times import datetime_to_long
--from whoosh.util import make_binary_tree
-+from whoosh.util import make_binary_tree, methodcaller
-
-
- # Exceptions
-@@ -176,7 +175,7 @@
- if self.is_leaf():
- return copy.copy(self)
- else:
-- return self.apply(operator.methodcaller("copy"))
-+ return self.apply(methodcaller("copy"))
-
- def replace(self, oldtext, newtext):
- """Returns a copy of this query with oldtext replaced by newtext (if
-@@ -189,7 +188,7 @@
- if self.is_leaf():
- return self.copy()
- else:
-- return self.apply(operator.methodcaller("replace", oldtext, newtext))
-+ return self.apply(methodcaller("replace", oldtext, newtext))
-
- def all_terms(self, termset=None, phrases=True):
- """Returns a set of all terms in this query tree.
---- a/src/whoosh/util.py
-+++ b/src/whoosh/util.py
-@@ -60,6 +60,15 @@
- return
-
-
-+try:
-+ from operator import methodcaller
-+except ImportError:
-+ def methodcaller(name, *args, **kwargs):
-+ def caller(obj):
-+ return getattr(obj, name)(*args, **kwargs)
-+ return caller
-+
-+
- if sys.platform == 'win32':
- now = time.clock
- else:
Deleted: packages/python-whoosh/trunk/debian/patches/fix_test_colonspace.diff
===================================================================
--- packages/python-whoosh/trunk/debian/patches/fix_test_colonspace.diff 2011-02-22 18:58:20 UTC (rev 15844)
+++ packages/python-whoosh/trunk/debian/patches/fix_test_colonspace.diff 2011-02-22 19:40:25 UTC (rev 15845)
@@ -1,28 +0,0 @@
-Description: The "content" field's analyzer was stripping the punctuation
-Origin: https://bitbucket.org/mchaput/whoosh/changeset/728f7f1f3bf3
-Author: Matt Chaput <matt at whoosh.ca>
-Bug: https://bitbucket.org/mchaput/whoosh/issue/109
-
---- a/tests/test_parsing.py
-+++ b/tests/test_parsing.py
-@@ -54,7 +54,6 @@
-
- def test_colonspace(self):
- s = fields.Schema(content=fields.TEXT, url=fields.ID)
--
- qp = qparser.QueryParser("content", s)
- q = qp.parse(u"url:test")
- self.assertEqual(q.__class__, query.Term)
-@@ -75,9 +74,11 @@
- self.assertEqual(q.fieldname, "content")
- self.assertEqual(q.text, "url")
-
-+ s = fields.Schema(foo=fields.KEYWORD)
-+ qp = qparser.QueryParser("foo", s)
- q = qp.parse(u"blah:")
- self.assertEqual(q.__class__, query.Term)
-- self.assertEqual(q.fieldname, "content")
-+ self.assertEqual(q.fieldname, "foo")
- self.assertEqual(q.text, "blah:")
-
- def test_andor(self):
Modified: packages/python-whoosh/trunk/debian/patches/series
===================================================================
--- packages/python-whoosh/trunk/debian/patches/series 2011-02-22 18:58:20 UTC (rev 15844)
+++ packages/python-whoosh/trunk/debian/patches/series 2011-02-22 19:40:25 UTC (rev 15845)
@@ -1,3 +1 @@
shm_check.diff
-fix_methodcaller_import.diff
-fix_test_colonspace.diff
More information about the Python-modules-commits
mailing list