Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-datadiff for openSUSE:Factory
checked in at 2023-10-05 20:03:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-datadiff (Old)
and /work/SRC/openSUSE:Factory/.python-datadiff.new.28202 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-datadiff"
Thu Oct 5 20:03:59 2023 rev:4 rq:1115635 version:2.2.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-datadiff/python-datadiff.changes
2023-03-24 15:20:14.270830612 +0100
+++
/work/SRC/openSUSE:Factory/.python-datadiff.new.28202/python-datadiff.changes
2023-10-05 20:05:00.650739839 +0200
@@ -1,0 +2,20 @@
+Tue Oct 03 08:04:27 UTC 2023 - [email protected]
+
+- Update to version 2.2.0:
+ * Bump version
+ * Removed separate version file now that Setuptools can read without
importing.
+ * Ran ruff --fix to clean up some lint.
+ * Remove LICENSE from MANIFEST.in (Setuptools includes it by default now).
+ * Add a pyproject.toml for better packaging support.
+ * Mark failing tests as xfail until someone can investigate.
+ * Moved package metadata to declarative setup.cfg
+ * Remove tests_require
+ * Remove superfluous license field
+ * Remove commented code for deprecated usage.
+ * Port test runner to nose.
+- added patches
+ https://sourceforge.net/p/datadiff/code/merge-requests/3/
+ + python-datadiff-no-six.patch
+- dropped switch-to-pytest.patch (merged upstream)
+
+-------------------------------------------------------------------
Old:
----
LICENSE-2.0.txt
datadiff-2.1.0.tar.xz
switch-to-pytest.patch
New:
----
datadiff-2.2.0.tar.xz
python-datadiff-no-six.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-datadiff.spec ++++++
--- /var/tmp/diff_new_pack.3aa25p/_old 2023-10-05 20:05:02.050790419 +0200
+++ /var/tmp/diff_new_pack.3aa25p/_new 2023-10-05 20:05:02.050790419 +0200
@@ -18,7 +18,7 @@
Name: python-datadiff
-Version: 2.1.0
+Version: 2.2.0
Release: 0
Summary: DataDiff is a library to provide human-readable diffs of
python data structures
License: Apache-2.0
@@ -26,8 +26,8 @@
#Source:
https://files.pythonhosted.org/packages/source/d/datadiff/datadiff-%%{version}.tar.gz
#Git-Clone: https://git.code.sf.net/p/datadiff/code
Source: datadiff-%{version}.tar.xz
-Source1: https://www.apache.org/licenses/LICENSE-2.0.txt
-Patch0: switch-to-pytest.patch
+# https://sourceforge.net/p/datadiff/code/merge-requests/3/
+Patch0: python-datadiff-no-six.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -48,7 +48,6 @@
%prep
%autosetup -p1 -n datadiff-%{version}
-cp %{SOURCE1} .
%build
%python_build
@@ -58,11 +57,10 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-# Broken tests with py311
-%pytest -k "not (test_diff_set or test_diff_frozenset)"
+%pytest
%files %{python_files}
-%license LICENSE-2.0.txt
+%license LICENSE
%{python_sitelib}/datadiff
%{python_sitelib}/datadiff-%{version}*-info
++++++ _service ++++++
--- /var/tmp/diff_new_pack.3aa25p/_old 2023-10-05 20:05:02.078791430 +0200
+++ /var/tmp/diff_new_pack.3aa25p/_new 2023-10-05 20:05:02.082791575 +0200
@@ -2,11 +2,11 @@
<service mode="disabled" name="tar_scm">
<param name="url">https://git.code.sf.net/p/datadiff/code</param>
<param name="scm">git</param>
- <param name="revision">8ee0ad3</param>
+ <param name="revision">284606</param>
<param name="package-meta">no</param>
<param name="changesgenerate">enable</param>
<param name="filename">datadiff</param>
- <param name="versionformat">2.1.0</param>
+ <param name="versionformat">2.2.0</param>
</service>
<service mode="disabled" name="recompress">
<param name="file">*.tar</param>
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.3aa25p/_old 2023-10-05 20:05:02.098792153 +0200
+++ /var/tmp/diff_new_pack.3aa25p/_new 2023-10-05 20:05:02.102792298 +0200
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param
name="url">https://git.code.sf.net/p/datadiff/code</param>
- <param
name="changesrevision">8ee0ad35cac2df636c04fdb55c4f81d1b3260430</param></service></servicedata>
+ <param
name="changesrevision">284606f7237ba0c73ddf6c305d8c4c5a8205fc1f</param></service></servicedata>
(No newline at EOF)
++++++ datadiff-2.1.0.tar.xz -> datadiff-2.2.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/datadiff-2.1.0/MANIFEST.in
new/datadiff-2.2.0/MANIFEST.in
--- old/datadiff-2.1.0/MANIFEST.in 2023-01-02 07:44:33.000000000 +0100
+++ new/datadiff-2.2.0/MANIFEST.in 2023-08-27 18:10:39.000000000 +0200
@@ -1 +1 @@
-include LICENSE tox.ini
\ No newline at end of file
+include tox.ini
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/datadiff-2.1.0/README.rst
new/datadiff-2.2.0/README.rst
--- old/datadiff-2.1.0/README.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/datadiff-2.2.0/README.rst 2023-08-27 18:10:39.000000000 +0200
@@ -0,0 +1,76 @@
+DataDiff
+========
+
+DataDiff is a library to provide human-readable diffs of python data
structures.
+It can handle sequence types (lists, tuples, etc), sets, and dictionaries.
+
+Dictionaries and sequences will be diffed recursively, when applicable.
+
+It has special-case handling for multi-line strings, showing them as a typical
unified diff.
+
+Drop-in replacements for some nose assertions are available. If the assertion
fails,
+a nice data diff is shown, letting you easily pinpoint the root difference.
+
+``datadiff`` works on Python 2.6 through Python 3.
+
+DataDiff project homepage: http://sourceforge.net/projects/datadiff/
+
+Example
+-------
+
+Here's an example::
+
+ >>> from datadiff import diff
+ >>> a = dict(foo=1, bar=2, baz=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
+ >>> b = dict(foo=1, bar=4, baz=[0, 1, 2, 3, 4, 5, 6, 7, 8])
+ >>> print diff(a, b)
+ --- a
+ +++ b
+ {
+ -'bar': 2,
+ +'bar': 4,
+ 'baz': [
+ @@ -5,11 +5,8 @@
+ 6,
+ 7,
+ 8,
+ -9,
+ -10,
+ -11,
+ ],
+ 'foo': 1,
+ }
+ >>>
+ >>> from datadiff.tools import assert_equal
+ >>> assert_equal([1, 2, 3], [1, 2, 5])
+ Traceback (most recent call last):
+ File "<stdin>", line 1, in <module>
+ File "datadiff/tools.py", line 29, in assert_equal
+ raise AssertionError(msg)
+ AssertionError:
+ --- a
+ +++ b
+ [
+ @@ -0,2 +0,2 @@
+ 1,
+ 2,
+ -3,
+ +5,
+ ]
+
+License
+-------
+
+Copyright Dave Brondsema
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/datadiff-2.1.0/datadiff/__init__.py
new/datadiff-2.2.0/datadiff/__init__.py
--- old/datadiff-2.1.0/datadiff/__init__.py 2023-01-02 07:44:33.000000000
+0100
+++ new/datadiff-2.2.0/datadiff/__init__.py 2023-08-27 18:10:39.000000000
+0200
@@ -19,7 +19,8 @@
import sys
from numbers import Number
-from .version import __version_info__, __version__
+__version_info__ = 2, 2, 0
+__version__ = '.'.join(map(str, __version_info__))
log = logging.getLogger('datadiff')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/datadiff-2.1.0/datadiff/tests/test_datadiff.py
new/datadiff-2.2.0/datadiff/tests/test_datadiff.py
--- old/datadiff-2.1.0/datadiff/tests/test_datadiff.py 2023-01-02
07:44:33.000000000 +0100
+++ new/datadiff-2.2.0/datadiff/tests/test_datadiff.py 2023-08-27
18:10:39.000000000 +0200
@@ -4,8 +4,8 @@
from datetime import datetime
from unittest.case import SkipTest
+import pytest
import six
-from nose.tools import assert_raises, assert_equal, assert_false, raises
from datadiff import diff, DataDiff, NotHashable, DiffNotImplementedForType,
DiffTypeError
@@ -19,16 +19,16 @@
def test_diff_objects():
- with assert_raises(DiffNotImplementedForType) as raised:
+ with pytest.raises(DiffNotImplementedForType) as raised:
diff(Foo(), Foo(), fromfile="x", tofile="y")
- assert_equal(raised.exception.attempted_type, Foo)
- assert_equal(str(raised.exception), "diff() not implemented for <class
'datadiff.tests.test_datadiff.Foo'>")
+ assert raised.value.attempted_type == Foo
+ assert str(raised.value) == "diff() not implemented for <class
'datadiff.tests.test_datadiff.Foo'>"
def test_diff_oneline_strings():
- with assert_raises(DiffNotImplementedForType) as raised:
+ with pytest.raises(DiffNotImplementedForType) as raised:
diff('foobar', 'baz', fromfile="x", tofile="y")
- assert_equal(raised.exception.attempted_type, str)
+ assert raised.value.attempted_type == str
def test_diff_multiline_strings():
@@ -40,7 +40,7 @@
abc
-def
ghi''')
- assert_equal(str(d), expected)
+ assert str(d) == expected
def test_diff_unicode_vs_str():
@@ -54,7 +54,7 @@
abc
-def
ghi''')
- assert_equal(str(d), expected)
+ assert str(d) == expected
def test_diff_list():
@@ -75,7 +75,7 @@
-5,
+6,
]''')
- assert_equal(str(d), expected)
+ assert str(d) == expected
def test_diff_list_context():
@@ -104,7 +104,7 @@
1,
@@ @@
]''')
- assert_equal(str(d), expected)
+ assert str(d) == expected
def test_diff_list_2nd_longer():
@@ -120,7 +120,7 @@
+4,
+5,
]''')
- assert_equal(str(d), expected)
+ assert str(d) == expected
def test_diff_list_list():
@@ -136,7 +136,7 @@
-[2, 3],
4,
]''')
- assert_equal(str(d), expected)
+ assert str(d) == expected
def test_diff_list_dict():
@@ -152,7 +152,7 @@
-{'a': 'b'},
4,
]''')
- assert_equal(str(d), expected)
+ assert str(d) == expected
def test_diff_list_set():
@@ -168,7 +168,7 @@
-%s8, 9%s,
4,
]''') % (set_start, set_end)
- assert_equal(str(d), expected)
+ assert str(d) == expected
def test_diff_seq_objects():
@@ -194,7 +194,7 @@
1,
+2,
])''')
- assert_equal(str(d), expected)
+ assert str(d) == expected
def test_diff_almost_seq_objects():
@@ -205,7 +205,7 @@
def __iter__(self):
return iter(self.list)
- assert_raises(DiffTypeError, diff, FooSeq([1]), FooSeq([1, 2]))
+ pytest.raises(DiffTypeError, diff, FooSeq([1]), FooSeq([1, 2]))
def test_tuple():
@@ -219,7 +219,7 @@
-2,
+3,
)''')
- assert_equal(str(d), expected)
+ assert str(d) == expected
def test_diff_dict():
@@ -248,7 +248,7 @@
assert "-'zero': 0," in diff_str
assert "+'zero': '@'," in diff_str
context_pattern = r"^ '\w+': \d+,$"
- assert_equal(_count_lines(context_pattern, diff_str), 3)
+ assert _count_lines(context_pattern, diff_str) == 3
def _count_lines(pattern, string):
@@ -273,7 +273,7 @@
+2: 2,
+datetime.datetime(2010, 10, 28, 0, 0): 1,
}''')
- assert_equal(str(d), expected)
+ assert str(d) == expected
def test_diff_dict_complex():
@@ -287,7 +287,7 @@
'a': 1,
-'b': {'foo': 'bar'},
}''')
- assert_equal(str(d), expected)
+ assert str(d) == expected
def test_diff_dict_similar_nested():
@@ -301,9 +301,11 @@
-'a': [1, 2],
+'a': (1, 2),
}''')
- assert_equal(str(d), expected)
+ assert str(d) == expected
+# test fails starting with Python 3.11
[email protected]('sys.version_info >= (3, 11)')
def test_diff_set(set_type=set):
a = set_type([1, 3, 5, 7, 'abc', 'def'])
b = set_type(['qwert', 3, 7, 'abc'])
@@ -320,7 +322,7 @@
'abc',
7,
])''') % set_type.__name__
- assert_equal(str(d), expected)
+ assert str(d) == expected
def test_diff_set_context():
@@ -337,60 +339,62 @@
3,
@@ @@
])''')
- assert_equal(str(d), expected)
+ assert str(d) == expected
+# test fails starting with Python 3.11
[email protected]('sys.version_info >= (3, 11)')
def test_diff_frozenset():
return test_diff_set(set_type=frozenset)
def test_equal_set():
- assert_false(diff(set([1]), set([1])))
+ assert not diff(set([1]), set([1]))
def test_empty_set():
- assert_false(diff(set([]), set([])))
+ assert not diff(set([]), set([]))
def test_eval_bool():
d = diff([1], [1], fromfile="x", tofile="y")
- assert_equal(bool(d), False)
+ assert bool(d) is False
d = diff([1], [2], fromfile="x", tofile="y")
- assert_equal(bool(d), True)
+ assert bool(d) is True
d = diff(dict(a=1), dict(a=1), fromfile="x", tofile="y")
- assert_equal(bool(d), False)
+ assert bool(d) is False
d = diff(dict(a=1, b=2, c=3, d=4), dict(a=1, b=2, c=3, d=4), fromfile="x",
tofile="y")
- assert_equal(bool(d), False)
+ assert bool(d) is False
def test_equal():
d = diff([1], [1], fromfile="x", tofile="y")
- assert_equal(str(d), '')
+ assert str(d) == ''
-@raises(DiffTypeError)
def test_diff_types():
- d = diff([1], {1: 1}, fromfile="x", tofile="y")
+ with pytest.raises(DiffTypeError):
+ diff([1], {1: 1}, fromfile="x", tofile="y")
-@raises(Exception)
def test_DataDiff_init_params():
- DataDiff(list, '[')
+ with pytest.raises(Exception):
+ DataDiff(list, '[')
def test_DataDiff_change_type():
dd = DataDiff(list, '[', ']')
dd.multi('foobar', [1234])
- assert_raises(Exception, str, dd)
+ pytest.raises(Exception, str, dd)
def test_unhashable_type():
a = []
b = [slice(1)]
- assert_raises(NotHashable, diff, a, b)
+ pytest.raises(NotHashable, diff, a, b)
def test_recursive_list():
@@ -413,7 +417,7 @@
],
3,
]''')
- assert_equal(str(d), expected)
+ assert str(d) == expected
def test_recursive_tuple_different_types():
@@ -437,7 +441,7 @@
),
3,
)''')
- assert_equal(str(d), expected)
+ assert str(d) == expected
def test_recursive_dict():
@@ -455,7 +459,7 @@
},
'c': 3,
}''')
- assert_equal(str(d), expected)
+ assert str(d) == expected
def test_recursive_set():
@@ -473,7 +477,7 @@
2,
])''' % (frozenset_start, frozenset_end,
frozenset_start, frozenset_end))
- assert_equal(str(d), expected)
+ assert str(d) == expected
def test_nested_unhashable():
@@ -496,7 +500,7 @@
},
),
]''')
- assert_equal(str(d), expected)
+ assert str(d) == expected
def test_nested_unhashable2():
@@ -517,4 +521,4 @@
},
},
]''')
- assert_equal(str(d), expected)
+ assert str(d) == expected
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/datadiff-2.1.0/datadiff/tests/test_datadiff_tools.py
new/datadiff-2.2.0/datadiff/tests/test_datadiff_tools.py
--- old/datadiff-2.1.0/datadiff/tests/test_datadiff_tools.py 2023-01-02
07:44:33.000000000 +0100
+++ new/datadiff-2.2.0/datadiff/tests/test_datadiff_tools.py 2023-08-27
18:10:39.000000000 +0200
@@ -1,21 +1,19 @@
-import sys
from textwrap import dedent
-from datadiff import tools
-from datadiff.tests.test_datadiff import assert_equal
+import pytest
-from nose.tools import assert_raises
+from datadiff import tools
def test_assert_equal_true():
# nothing raised
- assert_equal(None, tools.assert_equals(7, 7))
+ assert None is tools.assert_equals(7, 7)
def test_assert_equal_false():
- with assert_raises(AssertionError) as raised:
+ with pytest.raises(AssertionError) as raised:
tools.assert_equals([3, 4], [5, 6])
- assert_equal(str(raised.exception), dedent('''\
+ assert str(raised.value) == dedent('''\
--- a
+++ b
@@ -25,29 +23,29 @@
-4,
+5,
+6,
- ]'''))
+ ]''')
def test_assert_equal_msg():
- with assert_raises(AssertionError) as raised:
+ with pytest.raises(AssertionError) as raised:
tools.assert_equals(3, 4, "whoops")
- assert_equal(str(raised.exception), "whoops")
+ assert str(raised.value) == "whoops"
def test_assert_equals():
- assert_equal(tools.assert_equal, tools.assert_equals)
+ assert tools.assert_equal == tools.assert_equals
def test_assert_equal_simple():
- with assert_raises(AssertionError) as raised:
+ with pytest.raises(AssertionError) as raised:
tools.assert_equals(True, False)
- assert_equal(str(raised.exception), 'True != False')
+ assert str(raised.value) == 'True != False'
def test_assert_equal_simple_types():
- with assert_raises(AssertionError) as raised:
+ with pytest.raises(AssertionError) as raised:
tools.assert_equals('a', 7)
- assert_equal(str(raised.exception), dedent("'a' != 7"))
+ assert str(raised.value) == dedent("'a' != 7")
def test_assert_almost_equal():
@@ -59,7 +57,7 @@
def test_assert_not_almost_equal():
- assert_raises(AssertionError, tools.assertAlmostEqual, [1.0], [1.00001])
- assert_raises(AssertionError, tools.assertAlmostEqual, [1.0], [1.0001],
places=4)
- assert_raises(AssertionError, tools.assertAlmostEqual, {"k": 1.0}, {"k":
1.1}, places=4)
- assert_raises(AssertionError, tools.assertAlmostEqual, {1.0}, {1.1},
places=4)
+ pytest.raises(AssertionError, tools.assertAlmostEqual, [1.0], [1.00001])
+ pytest.raises(AssertionError, tools.assertAlmostEqual, [1.0], [1.0001],
places=4)
+ pytest.raises(AssertionError, tools.assertAlmostEqual, {"k": 1.0}, {"k":
1.1}, places=4)
+ pytest.raises(AssertionError, tools.assertAlmostEqual, {1.0}, {1.1},
places=4)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/datadiff-2.1.0/datadiff/version.py
new/datadiff-2.2.0/datadiff/version.py
--- old/datadiff-2.1.0/datadiff/version.py 2023-01-02 07:44:33.000000000
+0100
+++ new/datadiff-2.2.0/datadiff/version.py 1970-01-01 01:00:00.000000000
+0100
@@ -1,2 +0,0 @@
-__version_info__ = 2, 1, 0
-__version__ = '.'.join(map(str, __version_info__))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/datadiff-2.1.0/pyproject.toml
new/datadiff-2.2.0/pyproject.toml
--- old/datadiff-2.1.0/pyproject.toml 1970-01-01 01:00:00.000000000 +0100
+++ new/datadiff-2.2.0/pyproject.toml 2023-08-27 18:10:39.000000000 +0200
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["setuptools"]
+build-backend = "setuptools.build_meta"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/datadiff-2.1.0/setup.cfg new/datadiff-2.2.0/setup.cfg
--- old/datadiff-2.1.0/setup.cfg 2023-01-02 07:44:33.000000000 +0100
+++ new/datadiff-2.2.0/setup.cfg 2023-08-27 18:10:39.000000000 +0200
@@ -1,7 +1,30 @@
[metadata]
+name = datadiff
+version = attr:datadiff.__version__
+author = Dave Brondsema
+author_email = [email protected]
+description = DataDiff is a library to provide human-readable diffs of python
data structures.
+long_description = file:README.rst
+url = http://sourceforge.net/projects/datadiff/
+keywords =
+ data
+ diff
+classifiers =
+ Programming Language :: Python
+ Programming Language :: Python :: 3
+ Development Status :: 4 - Beta
+ Intended Audience :: Developers
+ License :: OSI Approved :: Apache Software License
+ Operating System :: OS Independent
+ Topic :: Software Development :: Libraries :: Python Modules
+
# This includes the license file(s) in the wheel.
#
https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file
license_files = LICENSE
+[options]
+packages = find_namespace:
+install_requires =
+
[bdist_wheel]
-universal=1
\ No newline at end of file
+universal=1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/datadiff-2.1.0/setup.py new/datadiff-2.2.0/setup.py
--- old/datadiff-2.1.0/setup.py 2023-01-02 07:44:33.000000000 +0100
+++ new/datadiff-2.2.0/setup.py 2023-08-27 18:10:39.000000000 +0200
@@ -1,114 +1,4 @@
-'''
-DataDiff
-========
-
-DataDiff is a library to provide human-readable diffs of python data
structures.
-It can handle sequence types (lists, tuples, etc), sets, and dictionaries.
-
-Dictionaries and sequences will be diffed recursively, when applicable.
-
-It has special-case handling for multi-line strings, showing them as a typical
unified diff.
-
-Drop-in replacements for some nose assertions are available. If the assertion
fails,
-a nice data diff is shown, letting you easily pinpoint the root difference.
-
-``datadiff`` works on Python 2.6 through Python 3.
-
-DataDiff project homepage: http://sourceforge.net/projects/datadiff/
-
-Example
--------
-
-Here's an example::
-
- >>> from datadiff import diff
- >>> a = dict(foo=1, bar=2, baz=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
- >>> b = dict(foo=1, bar=4, baz=[0, 1, 2, 3, 4, 5, 6, 7, 8])
- >>> print diff(a, b)
- --- a
- +++ b
- {
- -'bar': 2,
- +'bar': 4,
- 'baz': [
- @@ -5,11 +5,8 @@
- 6,
- 7,
- 8,
- -9,
- -10,
- -11,
- ],
- 'foo': 1,
- }
- >>>
- >>> from datadiff.tools import assert_equal
- >>> assert_equal([1, 2, 3], [1, 2, 5])
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- File "datadiff/tools.py", line 29, in assert_equal
- raise AssertionError(msg)
- AssertionError:
- --- a
- +++ b
- [
- @@ -0,2 +0,2 @@
- 1,
- 2,
- -3,
- +5,
- ]
-
-License
--------
-
-Copyright Dave Brondsema
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-'''
-
import setuptools
-exec (open('datadiff/version.py').read())
-params = dict(
- name='datadiff',
- packages=setuptools.find_packages(),
- version=__version__,
- description='DataDiff is a library to provide human-readable diffs of
python data structures.',
- long_description=__doc__,
- test_suite="nose.collector",
- author='Dave Brondsema',
- author_email='[email protected]',
- url='http://sourceforge.net/projects/datadiff/',
- keywords=['data', 'diff'],
- classifiers=[
- 'Programming Language :: Python',
- 'Programming Language :: Python :: 3',
- 'Development Status :: 4 - Beta',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: Apache Software License',
- 'Operating System :: OS Independent',
- 'Topic :: Software Development :: Libraries :: Python Modules',
- ],
- install_requires=[
- ],
- tests_require=[
- 'nose',
- 'six',
- ],
- license='Apache License',
-)
-
if __name__ == '__main__':
- setuptools.setup(**params)
+ setuptools.setup()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/datadiff-2.1.0/tox.ini new/datadiff-2.2.0/tox.ini
--- old/datadiff-2.1.0/tox.ini 2023-01-02 07:44:33.000000000 +0100
+++ new/datadiff-2.2.0/tox.ini 2023-08-27 18:10:39.000000000 +0200
@@ -5,11 +5,9 @@
setenv = PYTHONHASHSEED=0
deps =
coverage
- nose
+ pytest
six
-commands = coverage run --source=datadiff --branch --parallel-mode
{envbindir}/nosetests
-;commands = python setup.py test
-
+commands = coverage run --source=datadiff --branch --parallel-mode
{envbindir}/pytest
[testenv:coverage-report]
@@ -18,4 +16,4 @@
deps = coverage
commands = \
coverage combine
- coverage report -m
\ No newline at end of file
+ coverage report -m
++++++ python-datadiff-no-six.patch ++++++
diff --git a/datadiff/tests/test_datadiff.py b/datadiff/tests/test_datadiff.py
index 83f39e6..f30b340 100644
--- a/datadiff/tests/test_datadiff.py
+++ b/datadiff/tests/test_datadiff.py
@@ -5,7 +5,6 @@ from datetime import datetime
from unittest.case import SkipTest
import pytest
-import six
from datadiff import diff, DataDiff, NotHashable, DiffNotImplementedForType,
DiffTypeError
@@ -43,20 +42,6 @@ def test_diff_multiline_strings():
assert str(d) == expected
-def test_diff_unicode_vs_str():
- if six.PY3:
- raise SkipTest("Unicode and bytes are different types")
- d = diff(u'abc\ndef\nghi', b'abc\nghi', fromfile="x", tofile="y")
- expected = dedent('''\
- --- x
- +++ y
- @@ -1,3 +1,2 @@
- abc
- -def
- ghi''')
- assert str(d) == expected
-
-
def test_diff_list():
a = [1, 'xyz', 2, 3, 4, 5]
b = [1, 'abc', 2, 4, 6]
diff --git a/tox.ini b/tox.ini
index b9d77fc..b9c446a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -6,7 +6,6 @@ setenv = PYTHONHASHSEED=0
deps =
coverage
pytest
- six
commands = coverage run --source=datadiff --branch --parallel-mode
{envbindir}/pytest