diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000..2c8afeb --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1 @@ +/files diff --git a/debian/changelog b/debian/changelog index 70752c1..28331e9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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 Sun, 10 Nov 2024 00:24:28 -0300 + python-whoosh (2.7.4+git6-g9134ad92-8) unstable; urgency=medium * Team upload. diff --git a/debian/patches/0005-fix-weird-non-idiomatic-line.patch b/debian/patches/0005-fix-weird-non-idiomatic-line.patch new file mode 100644 index 0000000..2343bd7 --- /dev/null +++ b/debian/patches/0005-fix-weird-non-idiomatic-line.patch @@ -0,0 +1,25 @@ +From d9a3fa2a4905e7326c9623c89e6395713c189161 Mon Sep 17 00:00:00 2001 +From: Matt Chaput +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) diff --git a/debian/patches/0006-avoid-syntax-warning.patch b/debian/patches/0006-avoid-syntax-warning.patch new file mode 100644 index 0000000..e84c95d --- /dev/null +++ b/debian/patches/0006-avoid-syntax-warning.patch @@ -0,0 +1,105 @@ +From 2a04eb936ccb60af4dfdd523c68b99e0d43e373f Mon Sep 17 00:00:00 2001 +From: Jamison Lahman +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[.>]) + """, 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() + diff --git a/debian/patches/series b/debian/patches/series index c07c47c..42625e4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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 diff --git a/debian/patches/sphinx-8.0.patch b/debian/patches/sphinx-8.0.patch new file mode 100644 index 0000000..1e492df --- /dev/null +++ b/debian/patches/sphinx-8.0.patch @@ -0,0 +1,26 @@ +From: Colin Watson +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" diff --git a/debian/upstream/metadata b/debian/upstream/metadata index 6d41d69..510d055 100644 --- a/debian/upstream/metadata +++ b/debian/upstream/metadata @@ -1,5 +1,4 @@ Bug-Database: https://bitbucket.org/mchaput/whoosh/issues Contact: matt@whoosh.ca -Homepage: http://bitbucket.org/mchaput/whoosh Repository: https://bitbucket.org/mchaput/whoosh Repository-Browse: https://bitbucket.org/mchaput/whoosh/src