Package: wand
Severity: important
version; wand/0.3.8-1
Trying to do a nmu (see debdiff) I tried to enable the testsuite in order to
test my change. The test suite fail (see below). Moreover your package does not
build twice in a row. I have fixed it.
=====================================================================================
test session starts
=====================================================================================
platform linux2 -- Python 2.7.8 -- py-1.4.23 -- pytest-2.6.0
plugins: xdist
collected 259 items
tests/_resource_test.py
.................................................................
tests/color_test.py .............
tests/drawing_test.py ........................
tests/image_test.py
....F..F....F........FF.....................................................................................
tests/misc_test.py ..
tests/sequence_test.py ...............................................
==========================================================================================
FAILURES
===========================================================================================
_______________________________________________________________________________
test_read_from_unicode_filename
_______________________________________________________________________________
fx_asset = local('/tmp/buildd/wand-0.3.8/tests/assets'), tmpdir =
local('/tmp/pytest-0/test_read_from_unicode_filenam0')
def test_read_from_unicode_filename(fx_asset, tmpdir):
"""https://github.com/dahlia/wand/issues/122"""
filename = '모나리자.jpg'
if not PY3:
filename = filename.decode('utf-8')
path = os.path.join(text_type(tmpdir), filename) # workaround py.path
bug
> shutil.copyfile(str(fx_asset.join('mona-lisa.jpg')), path)
tests/image_test.py:67:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python2.7/shutil.py:68: in copyfile
if _samefile(src, dst):
/usr/lib/python2.7/shutil.py:58: in _samefile
return os.path.samefile(src, dst)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
f1 = '/tmp/buildd/wand-0.3.8/tests/assets/mona-lisa.jpg', f2 =
'/tmp/pytest-0/test_read_from_unicode_filenam0/\ubaa8\ub098\ub9ac\uc790.jpg'
def samefile(f1, f2):
"""Test whether two pathnames reference the same actual file"""
s1 = os.stat(f1)
> s2 = os.stat(f2)
E UnicodeEncodeError: 'ascii' codec can't encode characters in position
46-49: ordinal not in range(128)
/usr/lib/python2.7/posixpath.py:163: UnicodeEncodeError
_______________________________________________________________________________
test_new_from_unicode_filename
________________________________________________________________________________
fx_asset = local('/tmp/buildd/wand-0.3.8/tests/assets'), tmpdir =
local('/tmp/pytest-0/test_new_from_unicode_filename0')
def test_new_from_unicode_filename(fx_asset, tmpdir):
"""https://github.com/dahlia/wand/issues/122"""
filename = '모나리자.jpg'
if not PY3:
filename = filename.decode('utf-8')
path = os.path.join(text_type(tmpdir), filename) # workaround py.path
bug
> shutil.copyfile(str(fx_asset.join('mona-lisa.jpg')), path)
tests/image_test.py:106:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python2.7/shutil.py:68: in copyfile
if _samefile(src, dst):
/usr/lib/python2.7/shutil.py:58: in _samefile
return os.path.samefile(src, dst)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
f1 = '/tmp/buildd/wand-0.3.8/tests/assets/mona-lisa.jpg', f2 =
'/tmp/pytest-0/test_new_from_unicode_filename0/\ubaa8\ub098\ub9ac\uc790.jpg'
def samefile(f1, f2):
"""Test whether two pathnames reference the same actual file"""
s1 = os.stat(f1)
> s2 = os.stat(f2)
E UnicodeEncodeError: 'ascii' codec can't encode characters in position
46-49: ordinal not in range(128)
/usr/lib/python2.7/posixpath.py:163: UnicodeEncodeError
________________________________________________________________________________
test_save_to_unicode_filename
________________________________________________________________________________
fx_asset = local('/tmp/buildd/wand-0.3.8/tests/assets'), tmpdir =
local('/tmp/pytest-0/test_save_to_unicode_filename0')
def test_save_to_unicode_filename(fx_asset, tmpdir):
filename = '모나리자.jpg'
if not PY3:
filename = filename.decode('utf-8')
path = os.path.join(text_type(tmpdir), filename) # workaround py.path
bug
with Image(filename=str(fx_asset.join('mona-lisa.jpg'))) as orig:
> orig.save(filename=path)
tests/image_test.py:164:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
wand/image.py:2247: in save
filename = encode_filename(filename)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
filename =
'/tmp/pytest-0/test_save_to_unicode_filename0/\ubaa8\ub098\ub9ac\uc790.jpg'
def encode_filename(filename):
"""If ``filename`` is a :data:`text_type`, encode it to
:data:`binary_type` according to filesystem's default encoding.
"""
if isinstance(filename, text_type):
> return filename.encode(sys.getfilesystemencoding())
E UnicodeEncodeError: 'ascii' codec can't encode characters in
position 45-48: ordinal not in range(128)
wand/compat.py:86: UnicodeEncodeError
___________________________________________________________________________________
test_set_resolution_03
____________________________________________________________________________________
fx_asset = local('/tmp/buildd/wand-0.3.8/tests/assets')
def test_set_resolution_03(fx_asset):
"""Sets image resolution on constructor"""
with Image(filename=str(fx_asset.join('sample.pdf')),
resolution=(100,100)) as img:
> assert img.resolution == (100, 100)
tests/image_test.py:272:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
wand/image.py:814: in resolution
self.raise_exception()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <wand.image.Image: (closed)>, stacklevel = 1
def raise_exception(self, stacklevel=1):
"""Raises an exception or warning if it has occurred."""
e = self.get_exception()
if isinstance(e, Warning):
warnings.warn(e, stacklevel=stacklevel + 1)
elif isinstance(e, Exception):
> raise e
E WandError: wand contains no images `MagickWand-3972' @
error/magick-image.c/MagickGetImageResolution/5916
wand/resource.py:218: WandError
___________________________________________________________________________________
test_set_resolution_04
____________________________________________________________________________________
fx_asset = local('/tmp/buildd/wand-0.3.8/tests/assets')
def test_set_resolution_04(fx_asset):
"""Sets image resolution on constructor with integer as parameter."""
with Image(filename=str(fx_asset.join('sample.pdf')),
resolution=100) as img:
> assert img.resolution == (100, 100)
tests/image_test.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
wand/image.py:814: in resolution
self.raise_exception()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <wand.image.Image: (closed)>, stacklevel = 1
def raise_exception(self, stacklevel=1):
"""Raises an exception or warning if it has occurred."""
e = self.get_exception()
if isinstance(e, Warning):
warnings.warn(e, stacklevel=stacklevel + 1)
elif isinstance(e, Exception):
> raise e
E WandError: wand contains no images `MagickWand-3976' @
error/magick-image.c/MagickGetImageResolution/5916
wand/resource.py:218: WandError
============================================================================ 5
failed, 254 passed in 57.90 seconds
============================================================================
diff -Nru wand-0.3.8/debian/changelog wand-0.3.8/debian/changelog
--- wand-0.3.8/debian/changelog 2014-08-02 22:45:51.000000000 +0200
+++ wand-0.3.8/debian/changelog 2014-09-12 21:41:44.000000000 +0200
@@ -1,3 +1,13 @@
+wand (0.3.8-1.1) unstable; urgency=high
+
+ * NMU.
+ * Bug fix: "hardcodes dependency on obsolete libmagickwand5 package",
+ thanks to Emilio Pozuelo Monfort (Closes: #761104).
+ * Run test suite.
+ * Fix fail to build twice in a row.
+
+ -- Bastien Roucariès <roucaries.bastien+deb...@gmail.com> Fri, 12 Sep 2014 21:41:38 +0200
+
wand (0.3.8-1) unstable; urgency=medium
* New upstream release
diff -Nru wand-0.3.8/debian/control wand-0.3.8/debian/control
--- wand-0.3.8/debian/control 2014-08-02 22:45:51.000000000 +0200
+++ wand-0.3.8/debian/control 2014-09-12 20:55:31.000000000 +0200
@@ -11,6 +11,9 @@
python3-all (>= 3.2~),
python3-setuptools,
python-sphinx (>= 1.0.7+dfsg),
+ python-pytest (>= 2.3.0~),
+ python-pytest-xdist (>= 1.8~),
+ python-psutil (>= 1.0.1~),
Standards-Version: 3.9.5
Homepage: https://github.com/dahlia/wand
Vcs-Git: git://anonscm.debian.org/users/cwryu/wand.git
@@ -21,7 +24,7 @@
Package: python-wand
Architecture: all
Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends},
- libmagickwand5,
+ libmagickwand-6.q16-2,
Suggests: wand-doc
Description: Python interface for ImageMagick library (Python 2 build)
Wand is a ctypes-based simple ImageMagick binding for Python. It
@@ -37,7 +40,7 @@
Package: python3-wand
Architecture: all
Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends},
- libmagickwand5,
+ libmagickwand-6.q16-2,
Suggests: wand-doc
Description: Python interface for ImageMagick library (Python 3 build)
Wand is a ctypes-based simple ImageMagick binding for Python. It
@@ -52,7 +55,7 @@
Package: pypy-wand
Architecture: all
Depends: ${pypy:Depends}, ${shlibs:Depends}, ${misc:Depends},
- libmagickwand5,
+ libmagickwand-6.q16-2,
Suggests: wand-doc
Description: Python interface for ImageMagick library (PyPy build)
Wand is a ctypes-based simple ImageMagick binding for Python. It
diff -Nru wand-0.3.8/debian/patches/disable-memory-profiling-test.patch wand-0.3.8/debian/patches/disable-memory-profiling-test.patch
--- wand-0.3.8/debian/patches/disable-memory-profiling-test.patch 1970-01-01 01:00:00.000000000 +0100
+++ wand-0.3.8/debian/patches/disable-memory-profiling-test.patch 2014-09-12 20:54:39.000000000 +0200
@@ -0,0 +1,40 @@
+Subject: Disable memory profiling test
+from: Bastien ROUCARIÈS <roucaries.bastien+deb...@gmail.com>
+
+memory profile package is not compiled for debian disable this test
+
+forwarded: no
+Index: wand-0.3.8/setup.py
+===================================================================
+--- wand-0.3.8.orig/setup.py
++++ wand-0.3.8/setup.py
+@@ -48,7 +48,6 @@ setup(
+ tests_require=[
+ 'pytest >= 2.3.0',
+ 'pytest-xdist >= 1.8',
+- 'memory_profiler >= 0.27',
+ 'psutil >= 1.0.1'
+ ],
+ extras_require={'doc': ['Sphinx >=1.0']},
+Index: wand-0.3.8/tests/color_test.py
+===================================================================
+--- wand-0.3.8.orig/tests/color_test.py
++++ wand-0.3.8/tests/color_test.py
+@@ -1,7 +1,6 @@
+ import platform
+ import time
+
+-from memory_profiler import memory_usage
+ from pytest import mark
+
+ from wand.color import Color
+@@ -109,8 +108,4 @@ def color_memory_leak():
+
+ @mark.skipif('MAGICK_VERSION_INFO <= (6, 6, 9, 7)')
+ def test_memory_leak():
+- """https://github.com/dahlia/wand/pull/127"""
+- consumes = memory_usage((color_memory_leak, (), {}))
+- vm = platform.python_implementation()
+- minimum = 15.0 if vm == 'PyPy' else 1.0 # FIXME
+- assert consumes[-1] - consumes[0] <= minimum
++ pass
diff -Nru wand-0.3.8/debian/patches/series wand-0.3.8/debian/patches/series
--- wand-0.3.8/debian/patches/series 2014-08-02 22:45:51.000000000 +0200
+++ wand-0.3.8/debian/patches/series 2014-09-12 20:51:59.000000000 +0200
@@ -1 +1,2 @@
flask-sphinx-themes.patch
+disable-memory-profiling-test.patch
diff -Nru wand-0.3.8/debian/rules wand-0.3.8/debian/rules
--- wand-0.3.8/debian/rules 2014-08-02 22:45:51.000000000 +0200
+++ wand-0.3.8/debian/rules 2014-09-12 21:40:47.000000000 +0200
@@ -1,5 +1,5 @@
#!/usr/bin/make -f
-#export DH_VERBOSE=1
+# export DH_VERBOSE=1
PYVERS := $(shell pyversions -r)
PY3VERS := $(shell py3versions -r)
@@ -24,10 +24,17 @@
done
dh_auto_install
+override_dh_auto_test:
+ for PYTHON in $(PYVERS); do \
+ $$PYTHON setup.py test; \
+ done
+
.PHONY: build_doc clean_doc
override_dh_auto_clean: clean_doc
dh_auto_clean
+ test ! -d build || rm -rf build
+ test ! -d Wand.egg-info || rm -rf Wand.egg-info
build_doc:
$(MAKE) -C $(CURDIR)/docs devhelp