[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#854296: unblock: python-whoosh/2.7.0-2



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package python-whoosh. This is a QA upload fixing test
failures that caused FTBFS; the maintainer replied to my -1.1 NMU
and asked to orphan the package.

python-whoosh is a key package via sphinx's Build-Depends, although it could
be dropped from there at the cost of reduced test coverage.

(I know the Standards-Version bump and Vcs-* update are normally frowned
upon in unblock requests, but they were done before the hard freeze,
and are harmless. I can revert them if you really want me to.)

unblock python-whoosh/2.7.0-2

Thanks,
    S
diffstat for python-whoosh-2.7.0 python-whoosh-2.7.0

 changelog                                                               |   41 ++++
 control                                                                 |   10 -
 missing/english-words.10.gz                                             |binary
 patches/Fix-the-analyzer-in-test_vector_unicode-to-not-lowercase-.patch |   25 ++
 patches/Handle-an-empty-queue-exception-in-mpwriter.patch               |   95 ++++++++++
 patches/series                                                          |    2 
 rules                                                                   |    4 
 source/include-binaries                                                 |    1 
 8 files changed, 173 insertions(+), 5 deletions(-)

diff -Nru python-whoosh-2.7.0/debian/changelog python-whoosh-2.7.0/debian/changelog
--- python-whoosh-2.7.0/debian/changelog	2015-05-07 12:26:13.000000000 +0100
+++ python-whoosh-2.7.0/debian/changelog	2017-01-30 09:36:00.000000000 +0000
@@ -1,3 +1,44 @@
+python-whoosh (2.7.0-2) unstable; urgency=medium
+
+  * QA upload.
+  * Mark package as orphaned as requested on #812768
+  * d/p/Handle-an-empty-queue-exception-in-mpwriter.patch:
+    Add patch from upstream release 2.7.1 to cope with empty queue exception
+    (Closes: #853115)
+  * d/p/Fix-the-analyzer-in-test_vector_unicode-to-not-lowercase-.patch:
+    Use the upstream solution for the test involving Cherokee text
+    - d/p/test_vector_unicode-Cope-with-updated-Python-unicode-data.patch:
+      drop, no longer needed
+
+ -- Simon McVittie <smcv@debian.org>  Mon, 30 Jan 2017 09:36:00 +0000
+
+python-whoosh (2.7.0-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload, incorporating changes from collab-maint git.
+
+  [ Tobias Frost ]
+  * Team upload (collab-maint)
+  * d/control:
+    - Replace VCS-* with https:// ones.
+    - d/control: Bump S-V to 3.9.8 -- no changes required
+
+  [ Simon McVittie ]
+  * Add sphinxdoc-common to Build-Depends. The sphinxdoc debhelper
+    addon is required for the 'clean' target, so installing it in
+    Build-Depends-Indep is not enough.
+  * debian/missing/english-words.10.gz: Add missing file from upstream
+    2.7.0 tag. The unit tests require this file. (Closes: #812768)
+    - debian/source/include-binaries: Include it in the tarball.
+    - debian/rules: Copy the missing file into tests/ before building.
+      Delete it during clean.
+  * d/p/test_vector_unicode-Cope-with-updated-Python-unicode-data.patch:
+    Add patch to make a test pass under Python 3.5. It makes outdated
+    assumptions about how Python maps Cherokee text to lower-case.
+  * debian/rules: Disable HTTP network access to avoid Sphinx contacting
+    docs.python.org (Policy §4.9)
+
+ -- Simon McVittie <smcv@debian.org>  Sun, 22 Jan 2017 18:57:02 +0000
+
 python-whoosh (2.7.0-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru python-whoosh-2.7.0/debian/control python-whoosh-2.7.0/debian/control
--- python-whoosh-2.7.0/debian/control	2015-05-07 12:26:13.000000000 +0100
+++ python-whoosh-2.7.0/debian/control	2017-01-30 09:36:00.000000000 +0000
@@ -1,15 +1,15 @@
 Source: python-whoosh
 Section: python
 Priority: optional
-Maintainer: أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy@users.sourceforge.net>
-Build-Depends: debhelper (>= 9), dh-python, python-setuptools, python3-setuptools
+Maintainer: Debian QA Group <packages@qa.debian.org>
+Build-Depends: debhelper (>= 9), dh-python, python-setuptools, python3-setuptools, sphinx-common
 Build-Depends-Indep: python3-sphinx (>= 1.0.7+dfsg), python-all (>= 2.6.6-2), python3-all, python-pytest, python3-pytest
-Standards-Version: 3.9.6
+Standards-Version: 3.9.8
 Homepage: http://bitbucket.org/mchaput/whoosh/
 X-Python-Version: >= 2.5
 X-Python3-Version: >= 3.2
-Vcs-Git: git://anonscm.debian.org/collab-maint/python-whoosh.git
-Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/python-whoosh.git
+Vcs-Git: https://anonscm.debian.org/git/collab-maint/python-whoosh.git
+Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/python-whoosh.git
 
 Package: python-whoosh
 Architecture: all
Binary files /tmp/tLOQrYZBkE/python-whoosh-2.7.0/debian/missing/english-words.10.gz and /tmp/5Q0GGXhv4V/python-whoosh-2.7.0/debian/missing/english-words.10.gz differ
diff -Nru python-whoosh-2.7.0/debian/patches/Fix-the-analyzer-in-test_vector_unicode-to-not-lowercase-.patch python-whoosh-2.7.0/debian/patches/Fix-the-analyzer-in-test_vector_unicode-to-not-lowercase-.patch
--- python-whoosh-2.7.0/debian/patches/Fix-the-analyzer-in-test_vector_unicode-to-not-lowercase-.patch	1970-01-01 01:00:00.000000000 +0100
+++ python-whoosh-2.7.0/debian/patches/Fix-the-analyzer-in-test_vector_unicode-to-not-lowercase-.patch	2017-01-30 09:36:00.000000000 +0000
@@ -0,0 +1,25 @@
+From: Matt Chaput <matt@whoosh.ca>
+Date: Sat, 6 Feb 2016 22:30:22 -0500
+Subject: Fix the analyzer in test_vector_unicode() to not lowercase,
+ since this makes the test fail on some Python versions.
+
+Origin: upstream, 2.7.1
+---
+ tests/test_vectors.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test_vectors.py b/tests/test_vectors.py
+index 11e3c0b..ec690da 100644
+--- a/tests/test_vectors.py
++++ b/tests/test_vectors.py
+@@ -61,7 +61,9 @@ def test_vector_merge():
+ 
+ 
+ def test_vector_unicode():
+-    cf = fields.TEXT(vector=True)
++    from whoosh import analysis
++
++    cf = fields.TEXT(analyzer=analysis.RegexTokenizer(), vector=True)
+     schema = fields.Schema(id=fields.NUMERIC, text=cf)
+     with TempIndex(schema) as ix:
+         with ix.writer() as w:
diff -Nru python-whoosh-2.7.0/debian/patches/Handle-an-empty-queue-exception-in-mpwriter.patch python-whoosh-2.7.0/debian/patches/Handle-an-empty-queue-exception-in-mpwriter.patch
--- python-whoosh-2.7.0/debian/patches/Handle-an-empty-queue-exception-in-mpwriter.patch	1970-01-01 01:00:00.000000000 +0100
+++ python-whoosh-2.7.0/debian/patches/Handle-an-empty-queue-exception-in-mpwriter.patch	2017-01-30 09:36:00.000000000 +0000
@@ -0,0 +1,95 @@
+From: Matt Chaput <matt@whoosh.ca>
+Date: Fri, 8 May 2015 13:05:37 -0400
+Subject: Handle an empty queue exception in mpwriter.
+
+Fixes #414
+
+Origin: upstream, 2.7.1
+---
+ src/whoosh/compat.py    |  6 ++++--
+ src/whoosh/multiproc.py | 10 +++++++---
+ tests/test_mpwriter.py  |  6 +++---
+ 3 files changed, 14 insertions(+), 8 deletions(-)
+
+diff --git a/src/whoosh/compat.py b/src/whoosh/compat.py
+index 5154e6d..5408849 100644
+--- a/src/whoosh/compat.py
++++ b/src/whoosh/compat.py
+@@ -36,7 +36,8 @@ if sys.version_info[0] < 3:
+     bytes_type = str
+     unichr = unichr
+     from urllib import urlretrieve
+-    
++    import Queue as queue
++
+     def byte(num):
+         return chr(num)
+ 
+@@ -83,7 +84,8 @@ else:
+     bytes_type = bytes
+     unichr = chr
+     from urllib.request import urlretrieve
+-    
++    import queue
++
+     def byte(num):
+         return bytes((num,))
+ 
+diff --git a/src/whoosh/multiproc.py b/src/whoosh/multiproc.py
+index 54109a8..6353577 100644
+--- a/src/whoosh/multiproc.py
++++ b/src/whoosh/multiproc.py
+@@ -29,7 +29,7 @@ from __future__ import with_statement
+ import os
+ from multiprocessing import Process, Queue, cpu_count
+ 
+-from whoosh.compat import xrange, iteritems, pickle
++from whoosh.compat import queue, xrange, iteritems, pickle
+ from whoosh.codec import base
+ from whoosh.writing import PostingPool, SegmentWriter
+ from whoosh.externalsort import imerge
+@@ -111,6 +111,7 @@ class SubWriterTask(Process):
+             # number_of_docs_in_file). Pass those two pieces of information as
+             # arguments to _process_file().
+             self._process_file(*jobinfo)
++            # jobqueue.task_done()
+ 
+         if not self.running:
+             # I was cancelled, so I'll cancel my underlying writer
+@@ -273,8 +274,11 @@ class MpWriter(SegmentWriter):
+         # Pull a (run_file_name, fieldnames, segment) tuple off the result
+         # queue for each sub-task, representing the final results of the task
+         results = []
+-        for task in self.tasks:
+-            results.append(self.resultqueue.get(timeout=5))
++        for _ in self.tasks:
++            try:
++                results.append(self.resultqueue.get(timeout=1))
++            except queue.Empty:
++                pass
+ 
+         if self.multisegment:
+             # If we're not merging the segments, we don't care about the runname
+diff --git a/tests/test_mpwriter.py b/tests/test_mpwriter.py
+index 421bcce..510fed0 100644
+--- a/tests/test_mpwriter.py
++++ b/tests/test_mpwriter.py
+@@ -5,7 +5,7 @@ from collections import deque
+ import pytest
+ 
+ from whoosh import fields, query
+-from whoosh.compat import u, izip, xrange, permutations
++from whoosh.compat import u, izip, xrange, permutations, text_type
+ from whoosh.util.numeric import length_to_byte, byte_to_length
+ from whoosh.util.testing import TempIndex
+ 
+@@ -271,7 +271,7 @@ def test_finish_segment():
+         w = MpWriter(ix, procs=2, batchsize=1, multisegment=False,
+                      limitmb=0.00001)
+ 
+-        for i in range(9):
+-            w.add_document(a=u(chr(65 + i) * 50))
++        for i in range(100):
++            w.add_document(a=text_type(i) * 10)
+ 
+         w.commit()
diff -Nru python-whoosh-2.7.0/debian/patches/series python-whoosh-2.7.0/debian/patches/series
--- python-whoosh-2.7.0/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ python-whoosh-2.7.0/debian/patches/series	2017-01-30 09:36:00.000000000 +0000
@@ -0,0 +1,2 @@
+Handle-an-empty-queue-exception-in-mpwriter.patch
+Fix-the-analyzer-in-test_vector_unicode-to-not-lowercase-.patch
diff -Nru python-whoosh-2.7.0/debian/rules python-whoosh-2.7.0/debian/rules
--- python-whoosh-2.7.0/debian/rules	2015-05-07 12:26:13.000000000 +0100
+++ python-whoosh-2.7.0/debian/rules	2017-01-30 09:36:00.000000000 +0000
@@ -4,13 +4,17 @@
 %:
 	dh $@ --with=python2,python3,sphinxdoc --buildsystem=pybuild
 
+override_dh_auto_build: export http_proxy=127.0.0.1:9
+override_dh_auto_build: export https_proxy=127.0.0.1:9
 override_dh_auto_build:
+	cp debian/missing/english-words.10.gz tests/
 	dh_auto_build --buildsystem=pybuild
 	python3 setup.py build_sphinx
 
 override_dh_auto_clean:
 	dh_auto_clean
 	rm -rf docs/build
+	rm -f tests/english-words.10.gz
 
 override_dh_compress:
 	dh_compress -Xdoc/python-whoosh/html
diff -Nru python-whoosh-2.7.0/debian/source/include-binaries python-whoosh-2.7.0/debian/source/include-binaries
--- python-whoosh-2.7.0/debian/source/include-binaries	1970-01-01 01:00:00.000000000 +0100
+++ python-whoosh-2.7.0/debian/source/include-binaries	2017-01-30 09:36:00.000000000 +0000
@@ -0,0 +1 @@
+debian/missing/english-words.10.gz

Reply to: