Hello community, here is the log from the commit of package python-affine for openSUSE:Leap:15.2 checked in at 2020-02-13 14:40:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/python-affine (Old) and /work/SRC/openSUSE:Leap:15.2/.python-affine.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-affine" Thu Feb 13 14:40:51 2020 rev:2 rq:773537 version:2.3.0 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/python-affine/python-affine.changes 2020-02-11 23:24:47.845250707 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.python-affine.new.26092/python-affine.changes 2020-02-13 14:40:51.529657372 +0100 @@ -1,0 +2,10 @@ +Tue Feb 11 08:42:39 UTC 2020 - Bruno Friedmann <[email protected]> + +- Update to version 2.3.0 + + Right multiplication like vector * matrix is deprecated and will + raise AffineError in version 3.0.0. + + Change signature of Affine constructor to help users of PyCharm + + The Affine class docstring has been improved. +- cleaning spec + +------------------------------------------------------------------- Old: ---- affine-2.2.2.tar.gz New: ---- affine-2.3.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-affine.spec ++++++ --- /var/tmp/diff_new_pack.oqveiG/_old 2020-02-13 14:40:51.917657586 +0100 +++ /var/tmp/diff_new_pack.oqveiG/_new 2020-02-13 14:40:51.917657586 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-affine # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -13,28 +13,28 @@ # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ +# %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-affine -Version: 2.2.2 +Version: 2.3.0 Release: 0 -License: BSD-3-Clause Summary: Affine transformation matrices -Url: https://github.com/sgillies/affine +License: BSD-3-Clause Group: Development/Languages/Python +URL: https://github.com/sgillies/affine Source: https://files.pythonhosted.org/packages/source/a/affine/affine-%{version}.tar.gz -BuildRequires: python-rpm-macros BuildRequires: %{python_module setuptools} BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module coveralls} BuildRequires: %{python_module pydocstyle} BuildRequires: %{python_module pytest >= 3.0} BuildRequires: %{python_module pytest-cov} # /SECTION -BuildArch: noarch - %python_subpackages %description ++++++ affine-2.2.2.tar.gz -> affine-2.3.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/affine-2.2.2/AUTHORS.txt new/affine-2.3.0/AUTHORS.txt --- old/affine-2.2.2/AUTHORS.txt 2018-12-21 00:41:22.000000000 +0100 +++ new/affine-2.3.0/AUTHORS.txt 2019-09-05 00:22:41.000000000 +0200 @@ -3,7 +3,7 @@ - Sean Gillies <[email protected]> - Steven Ring <[email protected]> -- Mike Toews <[email protected]> +- Mike Taves <[email protected]> - Kevin Wurster <[email protected]> - Todd Small <[email protected]> - Juan Luis Cano RodrÃguez <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/affine-2.2.2/CHANGES.txt new/affine-2.3.0/CHANGES.txt --- old/affine-2.2.2/CHANGES.txt 2018-12-21 00:41:22.000000000 +0100 +++ new/affine-2.3.0/CHANGES.txt 2019-09-05 00:22:41.000000000 +0200 @@ -1,6 +1,19 @@ CHANGES ======= +2.3.0 (2019-09-04) +------------------ + +Deprecations: + +- Right multiplication like vector * matrix is deprecated and will raise + AffineError in version 3.0.0. + +Bug fixes: + +- Change signature of Affine constructor to help users of PyCharm (#45). +- The Affine class docstring has been improved. + 2.2.2 (2018-12-20) ------------------ - Affine.itransform computed the wrong results for arrays with rotation or diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/affine-2.2.2/PKG-INFO new/affine-2.3.0/PKG-INFO --- old/affine-2.2.2/PKG-INFO 2018-12-21 00:41:51.000000000 +0100 +++ new/affine-2.3.0/PKG-INFO 2019-09-05 00:23:11.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: affine -Version: 2.2.2 +Version: 2.3.0 Summary: Matrices describing affine transformation of the plane. Home-page: https://github.com/sgillies/affine Author: Sean Gillies diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/affine-2.2.2/affine/__init__.py new/affine-2.3.0/affine/__init__.py --- old/affine-2.2.2/affine/__init__.py 2018-12-21 00:41:22.000000000 +0100 +++ new/affine-2.3.0/affine/__init__.py 2019-09-05 00:22:41.000000000 +0200 @@ -1,12 +1,5 @@ """Affine transformation matrices -The 3x3 augmented affine transformation matrix for transformations in two -dimensions is illustrated below. - - | x' | | a b c | | x | - | y' | = | d e f | | y | - | 1 | | 0 0 1 | | 1 | - The Affine package is derived from Casey Duncan's Planar package. See the copyright statement below. """ @@ -43,11 +36,12 @@ from collections import namedtuple import math +import warnings __all__ = ['Affine'] __author__ = "Sean Gillies" -__version__ = "2.2.2" +__version__ = "2.3.0" EPSILON = 1e-5 @@ -123,10 +117,36 @@ namedtuple('Affine', ('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'))): """Two dimensional affine transform for 2D linear mapping. - Parallel lines are preserved by these transforms. Affine transforms - can perform any combination of translations, scales/flips, shears, - and rotations. Class methods are provided to conveniently compose - transforms from these operations. + Parameters + ---------- + a, b, c, d, e, f : float + Coefficients of an augmented affine transformation matrix + + | x' | | a b c | | x | + | y' | = | d e f | | y | + | 1 | | 0 0 1 | | 1 | + + `a`, `b`, and `c` are the elements of the first row of the + matrix. `d`, `e`, and `f` are the elements of the second row. + + Attributes + ---------- + a, b, c, d, e, f, g, h, i : float + The coefficients of the 3x3 augumented affine transformation + matrix + + | x' | | a b c | | x | + | y' | = | d e f | | y | + | 1 | | g h i | | 1 | + + `g`, `h`, and `i` are always 0, 0, and 1. + + The Affine package is derived from Casey Duncan's Planar package. + See the copyright statement below. Parallel lines are preserved by + these transforms. Affine transforms can perform any combination of + translations, scales/flips, shears, and rotations. Class methods + are provided to conveniently compose transforms from these + operations. Internally the transform is stored as a 3x3 transformation matrix. The transform may be constructed directly by specifying the first @@ -140,25 +160,19 @@ matrices and vectors in general, but provides a convenience for users of this class. - :param members: 6 floats for the first two matrix rows. - :type members: float """ precision = EPSILON - def __new__(cls, *members): + def __new__(cls, a, b, c, d, e, f): """Create a new object Parameters ---------- - members : list of float - Affine matrix members a, b, c, d, e, f + a, b, c, d, e, f : float + Elements of an augmented affine transformation matrix. """ - if len(members) == 6: - mat3x3 = [x * 1.0 for x in members] + [0.0, 0.0, 1.0] - return tuple.__new__(cls, mat3x3) - else: - raise TypeError( - "Expected 6 coefficients, found %d" % len(members)) + mat3x3 = [x * 1.0 for x in [a, b, c, d, e, f]] + [0.0, 0.0, 1.0] + return tuple.__new__(cls, mat3x3) @classmethod def from_gdal(cls, c, a, b, f, d, e): @@ -265,7 +279,10 @@ @classmethod def permutation(cls, *scaling): - """Create the permutation transform. For 2x2 matrices, there is only one permutation matrix that is not the identity. + """Create the permutation transform + + For 2x2 matrices, there is only one permutation matrix that is + not the identity. :rtype: Affine """ @@ -491,12 +508,17 @@ def __rmul__(self, other): """Right hand multiplication + .. deprecated:: 2.3.0 + Right multiplication will be prohibited in version 3.0. This method + will raise AffineError. + Notes ----- We should not be called if other is an affine instance This is just a guarantee, since we would potentially return the wrong answer in that case. """ + warnings.warn("Right multiplication will be prohibited in version 3.0", DeprecationWarning, stacklevel=2) assert not isinstance(other, Affine) return self.__mul__(other) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/affine-2.2.2/affine/tests/test_transform.py new/affine-2.3.0/affine/tests/test_transform.py --- old/affine-2.2.2/affine/tests/test_transform.py 2018-12-21 00:41:22.000000000 +0100 +++ new/affine-2.3.0/affine/tests/test_transform.py 2019-09-05 00:22:41.000000000 +0200 @@ -499,8 +499,9 @@ def test_rmul_tuple(): - t = Affine(1, 2, 3, 4, 5, 6) - (2.0, 2.0) * t + with pytest.warns(DeprecationWarning): + t = Affine(1, 2, 3, 4, 5, 6) + (2.0, 2.0) * t def test_transform_precision(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/affine-2.2.2/affine.egg-info/PKG-INFO new/affine-2.3.0/affine.egg-info/PKG-INFO --- old/affine-2.2.2/affine.egg-info/PKG-INFO 2018-12-21 00:41:51.000000000 +0100 +++ new/affine-2.3.0/affine.egg-info/PKG-INFO 2019-09-05 00:23:11.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: affine -Version: 2.2.2 +Version: 2.3.0 Summary: Matrices describing affine transformation of the plane. Home-page: https://github.com/sgillies/affine Author: Sean Gillies
