Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions debian/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/files
19 changes: 19 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
python-whoosh (2.7.4+git6-g9134ad92-10) unstable; urgency=medium

* Team upload.
* Port to Sphinx 8.0 (closes: #1090164).

-- Colin Watson <[email protected]> Fri, 20 Dec 2024 17:57:45 +0000

python-whoosh (2.7.4+git6-g9134ad92-9) unstable; urgency=medium

* Team upload.
* d/upstream/metadata: Remove Homepage key from metadata.
* d/patches/0005-fix-weird-non-idiomatic-line.patch: Add patch to avoid
SytanxWarning for the use of 'is' during the comparation between numbers
(Closes: #985017).
* d/patches/0006-avoid-syntax-warning.patch: Add patch to avoid Syntax
warning on scape string (Closes: #1078666).

-- Emmanuel Arias <[email protected]> Sun, 10 Nov 2024 00:24:28 -0300

python-whoosh (2.7.4+git6-g9134ad92-8) unstable; urgency=medium

* Team upload.
Expand Down
25 changes: 25 additions & 0 deletions debian/patches/0005-fix-weird-non-idiomatic-line.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From d9a3fa2a4905e7326c9623c89e6395713c189161 Mon Sep 17 00:00:00 2001
From: Matt Chaput <[email protected]>
Date: Sat, 15 Jan 2022 13:08:37 -0500
Subject: [PATCH] Fix weird non-idiomatic line

You should compare to an int using == not is (even though technically the int is implemented as a singleton object).
Not sure how or why I typed this originally.
Thanks to Philipp Kolmann for pointing this out.
---
src/whoosh/codec/whoosh3.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/whoosh/codec/whoosh3.py b/src/whoosh/codec/whoosh3.py
index 14b12205..a6b982a0 100644
--- a/src/whoosh/codec/whoosh3.py
+++ b/src/whoosh/codec/whoosh3.py
@@ -1117,7 +1117,7 @@ def _read_values(self):
vs = self._data[2]
if fixedsize is None or fixedsize < 0:
self._values = vs
- elif fixedsize is 0:
+ elif fixedsize == 0:
self._values = (None,) * self._blocklength
else:
assert isinstance(vs, bytes_type)
105 changes: 105 additions & 0 deletions debian/patches/0006-avoid-syntax-warning.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
From 2a04eb936ccb60af4dfdd523c68b99e0d43e373f Mon Sep 17 00:00:00 2001
From: Jamison Lahman <[email protected]>
Date: Sat, 29 Jul 2023 16:33:16 -0700
Subject: [PATCH] [chore] fix "SyntaxError: invalid escape sequence"

---
src/whoosh/analysis/filters.py | 4 ++--
src/whoosh/analysis/intraword.py | 6 +++---
src/whoosh/lang/paicehusk.py | 2 +-
src/whoosh/lang/porter2.py | 2 +-
tests/test_analysis.py | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/whoosh/analysis/filters.py b/src/whoosh/analysis/filters.py
index 3b6f5b47..5cea1480 100644
--- a/src/whoosh/analysis/filters.py
+++ b/src/whoosh/analysis/filters.py
@@ -53,7 +53,7 @@
\\S+? # URL body
(?=\\s|[.]\\s|$|[.]$) # Stop at space/end, or a dot followed by space/end
) | ( # or...
- \w+([:.]?\w+)* # word characters, with opt. internal colons/dots
+ \\w+([:.]?\\w+)* # word characters, with opt. internal colons/dots
)
""", verbose=True)

@@ -145,7 +145,7 @@ def __call__(self, tokens):


class TeeFilter(Filter):
- """Interleaves the results of two or more filters (or filter chains).
+ r"""Interleaves the results of two or more filters (or filter chains).

NOTE: because it needs to create copies of each token for each sub-filter,
this filter is quite slow.
diff --git a/src/whoosh/analysis/intraword.py b/src/whoosh/analysis/intraword.py
index 601423e1..9c1b8831 100644
--- a/src/whoosh/analysis/intraword.py
+++ b/src/whoosh/analysis/intraword.py
@@ -34,7 +34,7 @@


class CompoundWordFilter(Filter):
- """Given a set of words (or any object with a ``__contains__`` method),
+ r"""Given a set of words (or any object with a ``__contains__`` method),
break any tokens in the stream that are composites of words in the word set
into their individual parts.

@@ -272,7 +272,7 @@ class IntraWordFilter(Filter):
>>> iwf_i = IntraWordFilter(mergewords=True, mergenums=True)
>>> iwf_q = IntraWordFilter(mergewords=False, mergenums=False)
>>> iwf = MultiFilter(index=iwf_i, query=iwf_q)
- >>> analyzer = RegexTokenizer(r"\S+") | iwf | LowercaseFilter()
+ >>> analyzer = RegexTokenizer(r"\\S+") | iwf | LowercaseFilter()

(See :class:`MultiFilter`.)
"""
@@ -282,7 +282,7 @@ class IntraWordFilter(Filter):
__inittypes__ = dict(delims=text_type, splitwords=bool, splitnums=bool,
mergewords=bool, mergenums=bool)

- def __init__(self, delims=u("-_'\"()!@#$%^&*[]{}<>\|;:,./?`~=+"),
+ def __init__(self, delims=u("-_'\"()!@#$%^&*[]{}<>\\|;:,./?`~=+"),
splitwords=True, splitnums=True,
mergewords=False, mergenums=False):
"""
diff --git a/src/whoosh/lang/paicehusk.py b/src/whoosh/lang/paicehusk.py
index 481c3e40..6aee9066 100644
--- a/src/whoosh/lang/paicehusk.py
+++ b/src/whoosh/lang/paicehusk.py
@@ -30,7 +30,7 @@ class PaiceHuskStemmer(object):
(?P<cont>[.>])
""", re.UNICODE | re.VERBOSE)

- stem_expr = re.compile("^\w+", re.UNICODE)
+ stem_expr = re.compile(r"^\w+", re.UNICODE)

def __init__(self, ruletable):
"""
diff --git a/src/whoosh/lang/porter2.py b/src/whoosh/lang/porter2.py
index 4c740473..4d669752 100644
--- a/src/whoosh/lang/porter2.py
+++ b/src/whoosh/lang/porter2.py
@@ -64,7 +64,7 @@ def remove_initial_apostrophe(word):
def capitalize_consonant_ys(word):
if word.startswith('y'):
word = 'Y' + word[1:]
- return ccy_exp.sub('\g<1>Y', word)
+ return ccy_exp.sub(r'\g<1>Y', word)


def step_0(word):
diff --git a/tests/test_analysis.py b/tests/test_analysis.py
index c46a70db..425415f4 100644
--- a/tests/test_analysis.py
+++ b/tests/test_analysis.py
@@ -520,7 +520,7 @@ def test_stop_lang():


def test_issue358():
- t = analysis.RegexTokenizer("\w+")
+ t = analysis.RegexTokenizer(r"\w+")
with pytest.raises(analysis.CompositionError):
_ = t | analysis.StandardAnalyzer()

3 changes: 3 additions & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
0002-BF-TST-sort-suggestions-before-comparing-to-sorted-t.patch
0003-Mark-non-determinstic-test_minimize_dfa-test-as-XFAI.patch
0004-Use-tool-pytest-section-instead-of-pytest.patch
0005-fix-weird-non-idiomatic-line.patch
0006-avoid-syntax-warning.patch
sphinx-8.0.patch
26 changes: 26 additions & 0 deletions debian/patches/sphinx-8.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From: Colin Watson <[email protected]>
Date: Fri, 20 Dec 2024 17:54:34 +0000
Subject: Port to Sphinx 8.0

The old `intersphinx_mapping` format has been removed; it must now map
identifiers to (target, inventory) tuples.

Bug-Debian: https://bugs.debian.org/1090164
Last-Update: 2024-12-20
---
docs/source/conf.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/source/conf.py b/docs/source/conf.py
index e106a33..30504c2 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -192,7 +192,7 @@ latex_documents = [


# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'http://docs.python.org/': None}
+intersphinx_mapping = {'python': ('http://docs.python.org/', None)}

# Autodoc config
autoclass_content = "both"
1 change: 0 additions & 1 deletion debian/upstream/metadata
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Bug-Database: https://bitbucket.org/mchaput/whoosh/issues
Contact: [email protected]
Homepage: http://bitbucket.org/mchaput/whoosh
Repository: https://bitbucket.org/mchaput/whoosh
Repository-Browse: https://bitbucket.org/mchaput/whoosh/src
Loading