Compare commits
7 Commits
Author | SHA256 | Date | |
---|---|---|---|
120021a12a | |||
9d2db2b7d6 | |||
1357e8649f | |||
cd2618de81 | |||
f21a1a0562 | |||
f32ac4955a | |||
e96e50d487 |
BIN
Whoosh-2.7.4.tar.gz
(Stored with Git LFS)
BIN
Whoosh-2.7.4.tar.gz
(Stored with Git LFS)
Binary file not shown.
@@ -1,57 +0,0 @@
|
||||
From f5a777572fb9c91fa10be3c1ffd5f65cc9323653 Mon Sep 17 00:00:00 2001
|
||||
From: fortable1999 <fortable1999@gmail.com>
|
||||
Date: Wed, 12 Dec 2018 11:18:50 +0900
|
||||
Subject: [PATCH] Fixed test case for ListCorrector; Fixed FSA __eq__ function
|
||||
|
||||
---
|
||||
src/whoosh/automata/fsa.py | 7 +------
|
||||
tests/test_reading.py | 1 +
|
||||
tests/test_spelling.py | 7 ++++++-
|
||||
5 files changed, 12 insertions(+), 8 deletions(-)
|
||||
create mode 100644 .gitignore
|
||||
|
||||
diff --git a/src/whoosh/automata/fsa.py b/src/whoosh/automata/fsa.py
|
||||
index 280ddb50..54d23f2f 100644
|
||||
--- a/src/whoosh/automata/fsa.py
|
||||
+++ b/src/whoosh/automata/fsa.py
|
||||
@@ -44,12 +44,7 @@ def __eq__(self, other):
|
||||
return False
|
||||
st = self.transitions
|
||||
ot = other.transitions
|
||||
- if list(st) != list(ot):
|
||||
- return False
|
||||
- for key in st:
|
||||
- if st[key] != ot[key]:
|
||||
- return False
|
||||
- return True
|
||||
+ return st == ot
|
||||
|
||||
def all_states(self):
|
||||
stateset = set(self.transitions)
|
||||
diff --git a/tests/test_reading.py b/tests/test_reading.py
|
||||
index e2c2b71d..9fefc41c 100644
|
||||
--- a/tests/test_reading.py
|
||||
+++ b/tests/test_reading.py
|
||||
@@ -1,3 +1,4 @@
|
||||
+# coding=utf-8
|
||||
from __future__ import with_statement
|
||||
import random, threading, time
|
||||
|
||||
diff --git a/tests/test_spelling.py b/tests/test_spelling.py
|
||||
index ce5284f1..440c2d02 100644
|
||||
--- a/tests/test_spelling.py
|
||||
+++ b/tests/test_spelling.py
|
||||
@@ -20,7 +20,12 @@ def test_list_corrector():
|
||||
corr = spelling.ListCorrector(_wordlist)
|
||||
typo = "reoction"
|
||||
sugs = list(corr.suggest(typo, maxdist=2))
|
||||
- target = [w for w in _wordlist if levenshtein(typo, w) <= 2]
|
||||
+ target = []
|
||||
+ for lev_dist in range(1, 3):
|
||||
+ # sugs will return suggest first ordered by levenshtein distance
|
||||
+ # then second order by dictionary order
|
||||
+ target += [w for w in _wordlist
|
||||
+ if levenshtein(typo, w) <= lev_dist and w not in target]
|
||||
assert sugs == target
|
||||
|
||||
|
@@ -1,13 +0,0 @@
|
||||
Index: Whoosh-2.7.4/setup.cfg
|
||||
===================================================================
|
||||
--- Whoosh-2.7.4.orig/setup.cfg
|
||||
+++ Whoosh-2.7.4/setup.cfg
|
||||
@@ -15,7 +15,7 @@ formats = zip,gztar
|
||||
push = sdist bdist_wheel upload
|
||||
pushdocs = build_sphinx upload_sphinx
|
||||
|
||||
-[pytest]
|
||||
+[tool:pytest]
|
||||
addopts = -rs --tb=native
|
||||
norecursedirs = .hg .tox _build tmp* env* benchmark stress
|
||||
minversion = 2.0
|
@@ -1,3 +1,38 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 14 10:19:14 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Silence reporting unavoidable duplicates.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 13 16:28:13 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Switch to fork under development and update to 2.7.5
|
||||
* test_bigfacet.py: print() is a function in Python 3
|
||||
* remove duplicate_plugin WhitespacePlugin
|
||||
* [RFC] Give SegmentWriter a cachable Searcher
|
||||
* Add support for wildcard regex tokenization
|
||||
* Fixed several errors and added support for the Sweep AI and
|
||||
Codecov bots
|
||||
* Update Python version in setup.py classifiers & fix indent
|
||||
* Improved documentation deployment and added additional locations
|
||||
where it can be found as backup
|
||||
- Drop merged patches:
|
||||
* pytest4.patch
|
||||
* py2encoding.patch
|
||||
* docs-Update-intersphinx_mapping.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 13 02:44:41 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Switch to pyproject macros.
|
||||
- No more greedy globs in %files.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 4 15:42:36 UTC 2024 - Christoph G <foss@grueninger.de>
|
||||
|
||||
- Fix intersphinx mapping by adding
|
||||
docs-Update-intersphinx_mapping.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 3 10:41:31 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
1
python-Whoosh.rpmlintrc
Normal file
1
python-Whoosh.rpmlintrc
Normal file
@@ -0,0 +1 @@
|
||||
addFilter("files-duplicate\s*/usr/share/doc/packages/python-Whoosh-doc/html")
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-Whoosh
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,24 +18,26 @@
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-Whoosh
|
||||
Version: 2.7.4
|
||||
Version: 2.7.5
|
||||
Release: 0
|
||||
Summary: Pure-Python full text indexing, search, and spell checking library
|
||||
License: BSD-2-Clause
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/whoosh-community/whoosh/
|
||||
Source: https://files.pythonhosted.org/packages/source/W/Whoosh/Whoosh-%{version}.tar.gz
|
||||
# upstream in completely unrelated https://github.com/whoosh-community/whoosh/commit/b43e5a432109
|
||||
Patch0: pytest4.patch
|
||||
# upstream in https://github.com/whoosh-community/whoosh/commit/f5a777572fb9
|
||||
Patch1: py2encoding.patch
|
||||
URL: https://github.com/Sygil-Dev/whoosh-reloaded
|
||||
Source0: https://github.com/Sygil-Dev/whoosh-reloaded/archive/refs/tags/v%{version}.tar.gz
|
||||
Source99: python-Whoosh.rpmlintrc
|
||||
# PATCH-FIX-UPSTREAM NullMatcherClass-hashable.patch gh#whoosh-community/whoosh#570 mcepl@suse.com
|
||||
# NullMatcherClass needs __hash__ method as well for Sphinx4 compatiblity.
|
||||
Patch2: NullMatcherClass-hashable.patch
|
||||
Patch0: NullMatcherClass-hashable.patch
|
||||
BuildRequires: %{python_module cached-property}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python3-Sphinx
|
||||
BuildRequires: python3-sphinx-jsonschema
|
||||
BuildRequires: python3-sphinx_rtd_theme
|
||||
Requires: python-cached-property
|
||||
BuildArch: noarch
|
||||
# SECTION the testing dependencies
|
||||
BuildRequires: %{python_module pytest}
|
||||
@@ -68,28 +70,28 @@ This package contains the documentation.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n Whoosh-%{version}
|
||||
%autosetup -p1 -n whoosh-reloaded-%{version}
|
||||
|
||||
# Fix CRLF->LF
|
||||
sed -i -e 's/\r$//' docs/source/api/filedb/{filestore,filetables,structfile}.rst
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
sphinx-build -b html -d docs/build/doctrees docs/source docs/build/html
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
export LANG=en_US.UTF8
|
||||
# test_list_corrector - depends on dict sorting thats in py3+ only
|
||||
%pytest -k 'not test_list_corrector'
|
||||
%pytest
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE.txt
|
||||
%doc README.txt
|
||||
%{python_sitelib}/*
|
||||
%doc README.md
|
||||
%{python_sitelib}/whoosh
|
||||
%{python_sitelib}/[Ww]hoosh_[Rr]eloaded-%{version}.dist-info
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%files -n python-Whoosh-doc
|
||||
|
3
v2.7.5.tar.gz
Normal file
3
v2.7.5.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e84ffc271c9daf9a22bc9ab576b9c4f7ad5cfdc0e096872b0ae32edc4b5c424d
|
||||
size 1072856
|
Reference in New Issue
Block a user