Skip to content

Commit ee0bf8b

Browse files
feat: update python-whoosh to 2.7.4+git6-g9134ad92-10
1 parent bab8e90 commit ee0bf8b

File tree

7 files changed

+179
-1
lines changed

7 files changed

+179
-1
lines changed

debian/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/files

debian/changelog

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
python-whoosh (2.7.4+git6-g9134ad92-10) unstable; urgency=medium
2+
3+
* Team upload.
4+
* Port to Sphinx 8.0 (closes: #1090164).
5+
6+
-- Colin Watson <[email protected]> Fri, 20 Dec 2024 17:57:45 +0000
7+
8+
python-whoosh (2.7.4+git6-g9134ad92-9) unstable; urgency=medium
9+
10+
* Team upload.
11+
* d/upstream/metadata: Remove Homepage key from metadata.
12+
* d/patches/0005-fix-weird-non-idiomatic-line.patch: Add patch to avoid
13+
SytanxWarning for the use of 'is' during the comparation between numbers
14+
(Closes: #985017).
15+
* d/patches/0006-avoid-syntax-warning.patch: Add patch to avoid Syntax
16+
warning on scape string (Closes: #1078666).
17+
18+
-- Emmanuel Arias <[email protected]> Sun, 10 Nov 2024 00:24:28 -0300
19+
120
python-whoosh (2.7.4+git6-g9134ad92-8) unstable; urgency=medium
221

322
* Team upload.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From d9a3fa2a4905e7326c9623c89e6395713c189161 Mon Sep 17 00:00:00 2001
2+
From: Matt Chaput <[email protected]>
3+
Date: Sat, 15 Jan 2022 13:08:37 -0500
4+
Subject: [PATCH] Fix weird non-idiomatic line
5+
6+
You should compare to an int using == not is (even though technically the int is implemented as a singleton object).
7+
Not sure how or why I typed this originally.
8+
Thanks to Philipp Kolmann for pointing this out.
9+
---
10+
src/whoosh/codec/whoosh3.py | 2 +-
11+
1 file changed, 1 insertion(+), 1 deletion(-)
12+
13+
diff --git a/src/whoosh/codec/whoosh3.py b/src/whoosh/codec/whoosh3.py
14+
index 14b12205..a6b982a0 100644
15+
--- a/src/whoosh/codec/whoosh3.py
16+
+++ b/src/whoosh/codec/whoosh3.py
17+
@@ -1117,7 +1117,7 @@ def _read_values(self):
18+
vs = self._data[2]
19+
if fixedsize is None or fixedsize < 0:
20+
self._values = vs
21+
- elif fixedsize is 0:
22+
+ elif fixedsize == 0:
23+
self._values = (None,) * self._blocklength
24+
else:
25+
assert isinstance(vs, bytes_type)
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
From 2a04eb936ccb60af4dfdd523c68b99e0d43e373f Mon Sep 17 00:00:00 2001
2+
From: Jamison Lahman <[email protected]>
3+
Date: Sat, 29 Jul 2023 16:33:16 -0700
4+
Subject: [PATCH] [chore] fix "SyntaxError: invalid escape sequence"
5+
6+
---
7+
src/whoosh/analysis/filters.py | 4 ++--
8+
src/whoosh/analysis/intraword.py | 6 +++---
9+
src/whoosh/lang/paicehusk.py | 2 +-
10+
src/whoosh/lang/porter2.py | 2 +-
11+
tests/test_analysis.py | 2 +-
12+
5 files changed, 8 insertions(+), 8 deletions(-)
13+
14+
diff --git a/src/whoosh/analysis/filters.py b/src/whoosh/analysis/filters.py
15+
index 3b6f5b47..5cea1480 100644
16+
--- a/src/whoosh/analysis/filters.py
17+
+++ b/src/whoosh/analysis/filters.py
18+
@@ -53,7 +53,7 @@
19+
\\S+? # URL body
20+
(?=\\s|[.]\\s|$|[.]$) # Stop at space/end, or a dot followed by space/end
21+
) | ( # or...
22+
- \w+([:.]?\w+)* # word characters, with opt. internal colons/dots
23+
+ \\w+([:.]?\\w+)* # word characters, with opt. internal colons/dots
24+
)
25+
""", verbose=True)
26+
27+
@@ -145,7 +145,7 @@ def __call__(self, tokens):
28+
29+
30+
class TeeFilter(Filter):
31+
- """Interleaves the results of two or more filters (or filter chains).
32+
+ r"""Interleaves the results of two or more filters (or filter chains).
33+
34+
NOTE: because it needs to create copies of each token for each sub-filter,
35+
this filter is quite slow.
36+
diff --git a/src/whoosh/analysis/intraword.py b/src/whoosh/analysis/intraword.py
37+
index 601423e1..9c1b8831 100644
38+
--- a/src/whoosh/analysis/intraword.py
39+
+++ b/src/whoosh/analysis/intraword.py
40+
@@ -34,7 +34,7 @@
41+
42+
43+
class CompoundWordFilter(Filter):
44+
- """Given a set of words (or any object with a ``__contains__`` method),
45+
+ r"""Given a set of words (or any object with a ``__contains__`` method),
46+
break any tokens in the stream that are composites of words in the word set
47+
into their individual parts.
48+
49+
@@ -272,7 +272,7 @@ class IntraWordFilter(Filter):
50+
>>> iwf_i = IntraWordFilter(mergewords=True, mergenums=True)
51+
>>> iwf_q = IntraWordFilter(mergewords=False, mergenums=False)
52+
>>> iwf = MultiFilter(index=iwf_i, query=iwf_q)
53+
- >>> analyzer = RegexTokenizer(r"\S+") | iwf | LowercaseFilter()
54+
+ >>> analyzer = RegexTokenizer(r"\\S+") | iwf | LowercaseFilter()
55+
56+
(See :class:`MultiFilter`.)
57+
"""
58+
@@ -282,7 +282,7 @@ class IntraWordFilter(Filter):
59+
__inittypes__ = dict(delims=text_type, splitwords=bool, splitnums=bool,
60+
mergewords=bool, mergenums=bool)
61+
62+
- def __init__(self, delims=u("-_'\"()!@#$%^&*[]{}<>\|;:,./?`~=+"),
63+
+ def __init__(self, delims=u("-_'\"()!@#$%^&*[]{}<>\\|;:,./?`~=+"),
64+
splitwords=True, splitnums=True,
65+
mergewords=False, mergenums=False):
66+
"""
67+
diff --git a/src/whoosh/lang/paicehusk.py b/src/whoosh/lang/paicehusk.py
68+
index 481c3e40..6aee9066 100644
69+
--- a/src/whoosh/lang/paicehusk.py
70+
+++ b/src/whoosh/lang/paicehusk.py
71+
@@ -30,7 +30,7 @@ class PaiceHuskStemmer(object):
72+
(?P<cont>[.>])
73+
""", re.UNICODE | re.VERBOSE)
74+
75+
- stem_expr = re.compile("^\w+", re.UNICODE)
76+
+ stem_expr = re.compile(r"^\w+", re.UNICODE)
77+
78+
def __init__(self, ruletable):
79+
"""
80+
diff --git a/src/whoosh/lang/porter2.py b/src/whoosh/lang/porter2.py
81+
index 4c740473..4d669752 100644
82+
--- a/src/whoosh/lang/porter2.py
83+
+++ b/src/whoosh/lang/porter2.py
84+
@@ -64,7 +64,7 @@ def remove_initial_apostrophe(word):
85+
def capitalize_consonant_ys(word):
86+
if word.startswith('y'):
87+
word = 'Y' + word[1:]
88+
- return ccy_exp.sub('\g<1>Y', word)
89+
+ return ccy_exp.sub(r'\g<1>Y', word)
90+
91+
92+
def step_0(word):
93+
diff --git a/tests/test_analysis.py b/tests/test_analysis.py
94+
index c46a70db..425415f4 100644
95+
--- a/tests/test_analysis.py
96+
+++ b/tests/test_analysis.py
97+
@@ -520,7 +520,7 @@ def test_stop_lang():
98+
99+
100+
def test_issue358():
101+
- t = analysis.RegexTokenizer("\w+")
102+
+ t = analysis.RegexTokenizer(r"\w+")
103+
with pytest.raises(analysis.CompositionError):
104+
_ = t | analysis.StandardAnalyzer()
105+

debian/patches/series

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
0002-BF-TST-sort-suggestions-before-comparing-to-sorted-t.patch
33
0003-Mark-non-determinstic-test_minimize_dfa-test-as-XFAI.patch
44
0004-Use-tool-pytest-section-instead-of-pytest.patch
5+
0005-fix-weird-non-idiomatic-line.patch
6+
0006-avoid-syntax-warning.patch
7+
sphinx-8.0.patch

debian/patches/sphinx-8.0.patch

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From: Colin Watson <[email protected]>
2+
Date: Fri, 20 Dec 2024 17:54:34 +0000
3+
Subject: Port to Sphinx 8.0
4+
5+
The old `intersphinx_mapping` format has been removed; it must now map
6+
identifiers to (target, inventory) tuples.
7+
8+
Bug-Debian: https://bugs.debian.org/1090164
9+
Last-Update: 2024-12-20
10+
---
11+
docs/source/conf.py | 2 +-
12+
1 file changed, 1 insertion(+), 1 deletion(-)
13+
14+
diff --git a/docs/source/conf.py b/docs/source/conf.py
15+
index e106a33..30504c2 100644
16+
--- a/docs/source/conf.py
17+
+++ b/docs/source/conf.py
18+
@@ -192,7 +192,7 @@ latex_documents = [
19+
20+
21+
# Example configuration for intersphinx: refer to the Python standard library.
22+
-intersphinx_mapping = {'http://docs.python.org/': None}
23+
+intersphinx_mapping = {'python': ('http://docs.python.org/', None)}
24+
25+
# Autodoc config
26+
autoclass_content = "both"

debian/upstream/metadata

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
Bug-Database: https://bitbucket.org/mchaput/whoosh/issues
22
3-
Homepage: http://bitbucket.org/mchaput/whoosh
43
Repository: https://bitbucket.org/mchaput/whoosh
54
Repository-Browse: https://bitbucket.org/mchaput/whoosh/src

0 commit comments

Comments
 (0)