diff -Nru wand-0.3.8/debian/changelog wand-0.3.9/debian/changelog --- wand-0.3.8/debian/changelog 2014-09-12 19:02:58.000000000 +0000 +++ wand-0.3.9/debian/changelog 2014-12-27 12:55:49.000000000 +0000 @@ -1,3 +1,12 @@ +wand (0.3.9-1) unstable; urgency=medium + + * New upstream release + * Clean built files (Closes: #761464) + * Install the upstream changelog file + * Standards-Version: 3.9.6 + + -- Changwoo Ryu Sat, 27 Dec 2014 21:55:39 +0900 + wand (0.3.8-2) unstable; urgency=medium * Add optional dependency on libmagickwand-6.q16-2 (Closes: #761104) diff -Nru wand-0.3.8/debian/control wand-0.3.9/debian/control --- wand-0.3.8/debian/control 2014-09-12 19:02:58.000000000 +0000 +++ wand-0.3.9/debian/control 2014-12-27 12:55:49.000000000 +0000 @@ -10,7 +10,7 @@ python3-all (>= 3.2~), python3-setuptools, python-sphinx (>= 1.0.7+dfsg), -Standards-Version: 3.9.5 +Standards-Version: 3.9.6 Homepage: https://github.com/dahlia/wand Vcs-Git: git://anonscm.debian.org/users/cwryu/wand.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=users/cwryu/wand.git;a=summary @@ -35,7 +35,7 @@ Package: python3-wand Architecture: all -Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends}, +Depends: ${python3:Depends}, ${misc:Depends}, libmagickwand5 | libmagickwand-6.q16-2, Suggests: wand-doc Description: Python interface for ImageMagick library (Python 3 build) @@ -50,7 +50,7 @@ Package: pypy-wand Architecture: all -Depends: ${pypy:Depends}, ${shlibs:Depends}, ${misc:Depends}, +Depends: ${pypy:Depends}, ${misc:Depends}, libmagickwand5 | libmagickwand-6.q16-2, Suggests: wand-doc Description: Python interface for ImageMagick library (PyPy build) diff -Nru wand-0.3.8/debian/rules wand-0.3.9/debian/rules --- wand-0.3.8/debian/rules 2014-09-12 19:02:58.000000000 +0000 +++ wand-0.3.9/debian/rules 2014-12-27 12:55:49.000000000 +0000 @@ -24,10 +24,15 @@ done dh_auto_install +override_dh_installchangelogs: + dh_installchangelogs $(CURDIR)/docs/changes.rst + .PHONY: build_doc clean_doc override_dh_auto_clean: clean_doc dh_auto_clean + rm -r -f $(CURDIR)/build + rm -r -f $(CURDIR)/*.egg-info build_doc: $(MAKE) -C $(CURDIR)/docs devhelp diff -Nru wand-0.3.8/docs/changes.rst wand-0.3.9/docs/changes.rst --- wand-0.3.8/docs/changes.rst 2014-08-02 19:12:55.000000000 +0000 +++ wand-0.3.9/docs/changes.rst 2014-12-19 20:27:39.000000000 +0000 @@ -1,6 +1,27 @@ Wand Changelog ============== +0.3 series +~~~~~~~~~~ + +Version 0.3.9 +------------- + +Released on December 20, 2014. + +- Added ``'pdf:use-cropbox'`` option to :attr:`Image.options + ` dictionary (and :const:`~wand.image.OPTIONS` + constant). [:issue:`185` by Christoph Neuroth] +- Fixed a bug that exception message was :class:`bytes` instead of + :class:`str` on Python 3. +- The ``size`` parameter of :class:`~wand.font.Font` class becomes optional. + Its default value is 0, which means *autosized*. + [:issue:`191` by Cha, Hojeong] +- Fixed a bug that :meth:`Image.read() ` had tried + using :c:func:`MagickReadImageFile()` even when the given file object + has no :attr:`mode` attribute. [:issue:`205` by Stephen J. Fuhry] + + Version 0.3.8 ------------- @@ -216,6 +237,9 @@ __ http://en.wikipedia.org/wiki/Seam_carving +0.2 series +~~~~~~~~~~ + Version 0.2.4 ------------- @@ -240,7 +264,7 @@ ` method (and :meth:`Image.watermark() ` method which internally uses it) didn't work. -- Fixed segmentation fault occured when :attr:`Color.red +- Fixed segmentation fault occurred when :attr:`Color.red `, :attr:`Color.green `, or :attr:`Color.blue ` is accessed. - Added :attr:`Color.alpha ` property. @@ -331,6 +355,9 @@ ``python -m wand.version``. +0.1 series +~~~~~~~~~~ + Version 0.1.10 -------------- diff -Nru wand-0.3.8/docs/guide/install.rst wand-0.3.9/docs/guide/install.rst --- wand-0.3.8/docs/guide/install.rst 2014-08-02 19:12:55.000000000 +0000 +++ wand-0.3.9/docs/guide/install.rst 2014-12-19 20:27:39.000000000 +0000 @@ -38,6 +38,13 @@ $ sudo apt-get install libmagickwand-dev +If you need SVG, WMF, OpenEXR, DjVu, and Graphviz support you have to install +``libmagickcore5-extra`` as well: + +.. sourcecode:: console + + $ sudo apt-get install libmagickcore5-extra + .. _install-imagemagick-redhat: diff -Nru wand-0.3.8/docs/index.rst wand-0.3.9/docs/index.rst --- wand-0.3.8/docs/index.rst 2014-08-02 19:12:55.000000000 +0000 +++ wand-0.3.9/docs/index.rst 2014-12-19 20:27:39.000000000 +0000 @@ -1,6 +1,22 @@ Wand ==== +.. image:: https://badge.fury.io/py/Wand.svg? + :alt: Latest PyPI version + :target: https://pypi.python.org/pypi/Wand + +.. image:: https://readthedocs.org/projects/wand/badge/ + :alt: Documentation Status + :target: http://docs.wand-py.org/en/latest/ + +.. image:: https://secure.travis-ci.org/dahlia/wand.svg?branch=master + :alt: Build Status + :target: https://travis-ci.org/dahlia/wand + +.. image:: https://img.shields.io/coveralls/dahlia/wand.svg + :alt: Coverage Status + :target: https://coveralls.io/r/dahlia/wand + Wand is a :mod:`ctypes`-based simple ImageMagick_ binding for Python. :: from wand.image import Image @@ -146,14 +162,6 @@ Check out :doc:`changes` also. -.. image:: https://secure.travis-ci.org/dahlia/wand.png?branch=master - :alt: Build Status - :target: http://travis-ci.org/dahlia/wand - -.. image:: https://coveralls.io/repos/dahlia/wand/badge.png - :alt: Coverage Status - :target: https://coveralls.io/r/dahlia/wand - .. _Hong Minhee: http://hongminhee.org/ .. _StyleShare: https://stylesha.re/ .. _contributors: https://github.com/dahlia/wand/graphs/contributors diff -Nru wand-0.3.8/docs/roadmap.rst wand-0.3.9/docs/roadmap.rst --- wand-0.3.8/docs/roadmap.rst 2014-08-02 19:12:55.000000000 +0000 +++ wand-0.3.9/docs/roadmap.rst 2014-12-19 20:27:39.000000000 +0000 @@ -18,7 +18,7 @@ PIL compatibility layer PIL has very long history and the most of Python projects still - depend on it. We will work on PIL compatiblity layer using Wand. + depend on it. We will work on PIL compatibility layer using Wand. It will provide two ways to emulate PIL: - Module-level compatibility which can be used by changing diff -Nru wand-0.3.8/docs/test.rst wand-0.3.9/docs/test.rst --- wand-0.3.8/docs/test.rst 2014-08-02 19:12:55.000000000 +0000 +++ wand-0.3.9/docs/test.rst 2014-12-19 20:27:39.000000000 +0000 @@ -77,15 +77,15 @@ Continuous Integration ---------------------- -.. image:: https://secure.travis-ci.org/dahlia/wand.png?branch=master +.. image:: https://secure.travis-ci.org/dahlia/wand.svg?branch=master :alt: Build Status - :target: http://travis-ci.org/dahlia/wand + :target: https://travis-ci.org/dahlia/wand `Travis CI`_ automatically builds and tests every commit and pull request. The above banner image shows the current status of Wand build. You can see the detail of the current status from the following URL: -http://travis-ci.org/dahlia/wand +https://travis-ci.org/dahlia/wand .. _Travis CI: http://travis-ci.org/ @@ -93,9 +93,9 @@ Code Coverage ------------- -.. image:: https://coveralls.io/repos/dahlia/wand/badge.png - :alt: Coverage Status - :target: https://coveralls.io/r/dahlia/wand +.. image:: https://img.shields.io/coveralls/dahlia/wand.svg + :alt: Coverage Status + :target: https://coveralls.io/r/dahlia/wand Coveralls_ support tracking Wand's test coverage. The above banner image shows the current status of Wand coverage. You can see the details of the diff -Nru wand-0.3.8/README.rst wand-0.3.9/README.rst --- wand-0.3.8/README.rst 2014-08-02 19:12:55.000000000 +0000 +++ wand-0.3.9/README.rst 2014-12-19 20:27:39.000000000 +0000 @@ -40,6 +40,10 @@ Development version http://docs.wand-py.org/en/latest/ + .. image:: https://readthedocs.org/projects/wand/badge/ + :alt: Documentation Status + :target: http://docs.wand-py.org/en/latest/ + Community --------- @@ -53,6 +57,10 @@ Package Index (Cheeseshop) https://pypi.python.org/pypi/Wand + .. image:: https://badge.fury.io/py/Wand.svg? + :alt: Latest PyPI version + :target: https://pypi.python.org/pypi/Wand + Mailing list wand@librelist.com @@ -70,15 +78,15 @@ `irc://irc.freenode.net/wand `_ Continuous Integration (Travis CI) - http://travis-ci.org/dahlia/wand + https://travis-ci.org/dahlia/wand - .. image:: https://secure.travis-ci.org/dahlia/wand.png?branch=master + .. image:: https://secure.travis-ci.org/dahlia/wand.svg?branch=master :alt: Build Status - :target: http://travis-ci.org/dahlia/wand + :target: https://travis-ci.org/dahlia/wand Code Coverage https://coveralls.io/r/dahlia/wand - .. image:: https://coveralls.io/repos/dahlia/wand/badge.png + .. image:: https://img.shields.io/coveralls/dahlia/wand.svg :alt: Coverage Status :target: https://coveralls.io/r/dahlia/wand diff -Nru wand-0.3.8/tests/image_test.py wand-0.3.9/tests/image_test.py --- wand-0.3.8/tests/image_test.py 2014-08-02 19:12:55.000000000 +0000 +++ wand-0.3.9/tests/image_test.py 2014-12-19 20:27:39.000000000 +0000 @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- +import codecs import io import os import os.path import shutil +import sys import tempfile import warnings @@ -15,6 +17,23 @@ from wand.font import Font +try: + filesystem_encoding = sys.getfilesystemencoding() +except RuntimeError: + unicode_filesystem_encoding = False +else: + try: + codec_info = codecs.lookup(filesystem_encoding) + except LookupError: + unicode_filesystem_encoding = False + else: + unicode_filesystem_encoding = codec_info.name in ( + 'utf-8', 'utf-16', 'utf-16-be', 'utf-16-le', + 'utf-32', 'utf-32-be', 'utf-32-le', + 'mbcs' # for Windows + ) + + def test_empty_image(): with Image() as img: assert img.size == (0,0) @@ -58,6 +77,8 @@ assert img.width == 402 +@mark.skipif(not unicode_filesystem_encoding, + reason='Unicode filesystem encoding needed') def test_read_from_unicode_filename(fx_asset, tmpdir): """https://github.com/dahlia/wand/issues/122""" filename = '모나리자.jpg' @@ -97,6 +118,8 @@ Image(filename=str(fx_asset.join('not-exists.jpg'))) +@mark.skipif(not unicode_filesystem_encoding, + reason='Unicode filesystem encoding needed') def test_new_from_unicode_filename(fx_asset, tmpdir): """https://github.com/dahlia/wand/issues/122""" filename = '모나리자.jpg' @@ -155,6 +178,8 @@ os.remove(savefile) +@mark.skipif(not unicode_filesystem_encoding, + reason='Unicode filesystem encoding needed') def test_save_to_unicode_filename(fx_asset, tmpdir): filename = '모나리자.jpg' if not PY3: diff -Nru wand-0.3.8/tox.ini wand-0.3.9/tox.ini --- wand-0.3.8/tox.ini 2014-08-02 19:12:55.000000000 +0000 +++ wand-0.3.9/tox.ini 2014-12-19 20:27:39.000000000 +0000 @@ -5,7 +5,7 @@ deps = pytest >= 2.3.0 pytest-xdist >= 1.8 - pytest-cov >= 1.6 + pytest-cov >= 1.8.0 memory_profiler >= 0.27 psutil >= 1.0.1 commands = py.test {posargs:--durations=5 --boxed} diff -Nru wand-0.3.8/.travis.yml wand-0.3.9/.travis.yml --- wand-0.3.8/.travis.yml 2014-08-02 19:12:55.000000000 +0000 +++ wand-0.3.9/.travis.yml 2014-12-19 20:27:39.000000000 +0000 @@ -9,7 +9,7 @@ env: - secure: "EhG2uSD2m1eGxuL2HeQewJJx7MVL4WpjrxyfiUBEgsApemD1yKJPjUnLwAyd\nbPi5HJx5ySm1TTRSvj6/yP85YLYTaJHA8OabKk7p0wFW294qcrYIDGovU7NL\n3YOqZmqN+S3XOBGFCOnByxE+pcxxWW/3/I09EgeW7D6tBPh67G0=" install: -- pip install pytest pytest-xdist pytest-cov pytest-capturelog memory_profiler psutil coveralls +- pip install pytest pytest-xdist 'pytest-cov>=1.8.0' pytest-capturelog memory_profiler psutil coveralls - pip install -e . script: - python -mwand.version --verbose diff -Nru wand-0.3.8/wand/api.py wand-0.3.9/wand/api.py --- wand-0.3.8/wand/api.py 2014-08-02 19:12:55.000000000 +0000 +++ wand-0.3.9/wand/api.py 2014-12-19 20:27:39.000000000 +0000 @@ -41,7 +41,7 @@ def find_library(suffix=''): """Finds library path to try loading. The result paths are not - guarenteed that they exist. + guaranteed that they exist. :param suffix: optional suffix e.g. ``'-Q16'`` :type suffix: :class:`basestring` diff -Nru wand-0.3.8/wand/font.py wand-0.3.9/wand/font.py --- wand-0.3.8/wand/font.py 2014-08-02 19:12:55.000000000 +0000 +++ wand-0.3.9/wand/font.py 2014-12-19 20:27:39.000000000 +0000 @@ -43,13 +43,24 @@ class Font(tuple): - """Font struct which is a subtype of :class:`tuple`. Its constructor - takes :attr:`path`, :attr:`size`, :attr:`color` (black by default), and - :attr:`antialias` (``True`` by default). + """Font struct which is a subtype of :class:`tuple`. + + :param path: the path of the font file + :type path: :class:`str`, :class:`basestring` + :param size: the size of typeface. 0 by default which means *autosized* + :type size: :class:`numbers.Real` + :param color: the color of typeface. black by default + :type color: :class:`~wand.color.Color` + :param antialias: whether to use antialiasing. :const:`True` by default + :type antialias: :class:`bool` + + .. versionchanged:: 0.3.9 + The ``size`` parameter becomes optional. Its default value is + 0, which means *autosized*. """ - def __new__(cls, path, size, color=None, antialias=True): + def __new__(cls, path, size=0, color=None, antialias=True): if not isinstance(path, string_type): raise TypeError('path must be a string, not ' + repr(path)) if not isinstance(size, numbers.Real): diff -Nru wand-0.3.8/wand/image.py wand-0.3.9/wand/image.py --- wand-0.3.8/wand/image.py 2014-08-02 19:12:55.000000000 +0000 +++ wand-0.3.9/wand/image.py 2014-12-19 20:27:39.000000000 +0000 @@ -395,7 +395,10 @@ #: #: .. versionchanged:: 0.3.4 #: Added ``'jpeg:sampling-factor'`` option. -OPTIONS = frozenset(['fill', 'jpeg:sampling-factor']) +#: +#: .. versionchanged:: 0.3.9 +#: Added ``'pdf:use-cropbox'`` option. +OPTIONS = frozenset(['fill', 'jpeg:sampling-factor', 'pdf:use-cropbox']) #: (:class:`tuple`) The list of :attr:`Image.compression` types. #: @@ -438,6 +441,9 @@ #: #: .. versionchanged:: 0.3.4 #: Added ``'jpeg:sampling-factor'`` option. + #: + #: .. versionchanged:: 0.3.9 + #: Added ``'pdf:use-cropbox'`` option. options = None #: (:class:`collections.Sequence`) The list of @@ -1023,7 +1029,7 @@ @property def quantum_range(self): """(:class:`int`) The maxumim value of a color channel that is - supported by the imagemgick library. + supported by the imagemagick library. .. versionadded:: 0.2.0 @@ -1864,7 +1870,7 @@ default is transparent :type background: :class:`wand.color.Color` :param resolution: set a resolution value (dpi), - usefull for vectorial formats (like pdf) + useful for vectorial formats (like pdf) :type resolution: :class:`collections.Sequence`, :Class:`numbers.Integral` @@ -1934,7 +1940,7 @@ open_args = image, blob, file, filename if (any(a is not None for a in new_args) and any(a is not None for a in open_args)): - raise TypeError('blank image parameters cant be used with image ' + raise TypeError("blank image parameters can't be used with image " 'opening parameters') elif any(a is not None and b is not None for i, a in enumerate(open_args) @@ -1998,7 +2004,7 @@ :param filename: reads an image from the ``filename`` string :type filename: :class:`basestring` :param resolution: set a resolution value (DPI), - usefull for vectorial formats (like PDF) + useful for vectorial formats (like PDF) :type resolution: :class:`collections.Sequence`, :class:`numbers.Integral` @@ -2018,7 +2024,7 @@ 'integer of the same x/y') if file is not None: if (isinstance(file, file_types) and - hasattr(libc, 'fdopen')): + hasattr(libc, 'fdopen') and hasattr(file, 'mode')): fd = libc.fdopen(file.fileno(), file.mode) r = library.MagickReadImageFile(self.wand, fd) elif not callable(getattr(file, 'read', None)): @@ -2208,7 +2214,7 @@ :param file: a file object to write to :type file: file object :param filename: a filename string to write to - :type filename: :class:`basename` + :type filename: :class:`basestring` .. versionadded:: 0.1.5 The ``file`` parameter. diff -Nru wand-0.3.8/wand/resource.py wand-0.3.9/wand/resource.py --- wand-0.3.8/wand/resource.py 2014-08-02 19:12:55.000000000 +0000 +++ wand-0.3.9/wand/resource.py 2014-12-19 20:27:39.000000000 +0000 @@ -10,6 +10,7 @@ import warnings from .api import library +from .compat import string_type from .exceptions import TYPE_MAP, WandException @@ -207,7 +208,10 @@ return self.c_clear_exception(self.wand) exc_cls = TYPE_MAP[severity.value] - return exc_cls(desc.value) + message = desc.value + if not isinstance(message, string_type): + message = message.decode() + return exc_cls(message) def raise_exception(self, stacklevel=1): """Raises an exception or warning if it has occurred.""" diff -Nru wand-0.3.8/wand/version.py wand-0.3.9/wand/version.py --- wand-0.3.8/wand/version.py 2014-08-02 19:12:55.000000000 +0000 +++ wand-0.3.9/wand/version.py 2014-12-19 20:27:39.000000000 +0000 @@ -42,7 +42,7 @@ #: #: .. versionchanged:: 0.1.9 #: Becomes :class:`tuple`. (It was string before.) -VERSION_INFO = (0, 3, 8) +VERSION_INFO = (0, 3, 9) #: (:class:`basestring`) The version string e.g. ``'0.1.2'``. #: