Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-dictdiffer for 
openSUSE:Factory checked in at 2021-12-16 21:19:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-dictdiffer (Old)
 and      /work/SRC/openSUSE:Factory/.python-dictdiffer.new.2520 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-dictdiffer"

Thu Dec 16 21:19:42 2021 rev:2 rq:940870 version:0.9.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-dictdiffer/python-dictdiffer.changes      
2020-06-09 00:05:05.269380839 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-dictdiffer.new.2520/python-dictdiffer.changes
    2021-12-16 21:20:56.058558271 +0100
@@ -1,0 +2,12 @@
+Tue Dec 14 13:23:16 UTC 2021 - [email protected]
+
+- version update to 0.9.0
+  - Adds absolute tolerance feature for floats  (@adrien-berchet) (#152)
+  - Drops support of Python<3.5  (@adrien-berchet) (#160)
+  - Adds `assert_no_diff` helper to assist pytest users  (@joesolly) (#153)
+  - Migrates CI to gh-actions (@ParthS007 @diegodelemos) (#145)
+  - Removes dependency on pkg_resources (@eldruin)
+- modified patches
+  % lower-reqs.diff (refreshed)
+
+-------------------------------------------------------------------

Old:
----
  dictdiffer-0.8.1.tar.gz

New:
----
  dictdiffer-0.9.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-dictdiffer.spec ++++++
--- /var/tmp/diff_new_pack.9A4iix/_old  2021-12-16 21:20:56.602558478 +0100
+++ /var/tmp/diff_new_pack.9A4iix/_new  2021-12-16 21:20:56.614558483 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-dictdiffer
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-dictdiffer
-Version:        0.8.1
+Version:        0.9.0
 Release:        0
 Summary:        Dictdiffer is a library that helps you to diff and patch 
dictionaries
 License:        MIT
@@ -26,7 +26,6 @@
 URL:            https://github.com/inveniosoftware/dictdiffer
 Source:         
https://files.pythonhosted.org/packages/source/d/dictdiffer/dictdiffer-%{version}.tar.gz
 Patch0:         lower-reqs.diff
-BuildRequires:  %{python_module pytest-runner >= 2.7}
 BuildRequires:  %{python_module setuptools_scm >= 1.15.0}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
@@ -47,6 +46,8 @@
 %patch0 -p1
 # Remove dependence on unnecessary pytest plugins
 rm pytest.ini
+# https://github.com/inveniosoftware/dictdiffer/issues/167
+sed -i '/pytest-runner/d' setup.py
 
 %build
 %python_build

++++++ dictdiffer-0.8.1.tar.gz -> dictdiffer-0.9.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/.github/workflows/pypi-release.yml 
new/dictdiffer-0.9.0/.github/workflows/pypi-release.yml
--- old/dictdiffer-0.8.1/.github/workflows/pypi-release.yml     1970-01-01 
01:00:00.000000000 +0100
+++ new/dictdiffer-0.9.0/.github/workflows/pypi-release.yml     2021-07-22 
15:24:20.000000000 +0200
@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+#
+# This file is part of Invenio.
+# Copyright (C) 2020 CERN.
+#
+# Invenio is free software; you can redistribute it and/or modify it
+# under the terms of the MIT License; see LICENSE file for more details
+
+name: Publish
+
+on:
+  push:
+    tags:
+      - v*
+
+jobs:
+  Publish:
+    runs-on: ubuntu-20.04
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+
+      - name: Set up Python
+        uses: actions/setup-python@v2
+        with:
+          python-version: 3.8
+
+      - name: Install dependencies
+        run: |
+          python -m pip install --upgrade pip
+          pip install setuptools wheel
+
+      - name: Build package
+        run: python setup.py sdist bdist_wheel
+
+      - name: Publish on PyPI
+        uses: pypa/[email protected]
+        with:
+          user: __token__
+          # The token is provided by the inveniosoftware organization
+          password: ${{ secrets.pypi_token }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/.github/workflows/tests.yml 
new/dictdiffer-0.9.0/.github/workflows/tests.yml
--- old/dictdiffer-0.8.1/.github/workflows/tests.yml    1970-01-01 
01:00:00.000000000 +0100
+++ new/dictdiffer-0.9.0/.github/workflows/tests.yml    2021-07-22 
15:24:20.000000000 +0200
@@ -0,0 +1,63 @@
+# -*- coding: utf-8 -*-
+#
+# This file is part of Invenio.
+# Copyright (C) 2020 CERN.
+#
+# Invenio is free software; you can redistribute it and/or modify it
+# under the terms of the MIT License; see LICENSE file for more details.
+
+name: CI
+
+on:
+  push:
+    branches: master
+  pull_request:
+    branches: master
+  schedule:
+    # * is a special character in YAML so you have to quote this string
+    - cron:  '0 3 * * 6'
+  workflow_dispatch:
+    inputs:
+      reason:
+        description: 'Reason'
+        required: false
+        default: 'Manual trigger'
+
+jobs:
+  Tests:
+    runs-on: ubuntu-20.04
+    strategy:
+      matrix:
+          python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
+          requirements-level: [min, pypi]
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+
+      - name: Set up Python ${{ matrix.python-version }}
+        uses: actions/setup-python@v2
+        with:
+          python-version: ${{ matrix.python-version }}
+
+      - name: Generate dependencies
+        run: |
+          sudo apt-get install libxml2-dev libxslt1-dev
+          python -m pip install --upgrade pip setuptools py wheel 
requirements-builder
+          requirements-builder -e all --level=${{ matrix.requirements-level }} 
setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version 
}}-requirements.txt
+
+      - name: Cache pip
+        uses: actions/cache@v2
+        with:
+          path: ~/.cache/pip
+          key: ${{ runner.os }}-pip-${{ hashFiles('.${{ 
matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt') }}
+
+      - name: Install dependencies
+        run: |
+          pip install -r .${{ matrix.requirements-level }}-${{ 
matrix.python-version }}-requirements.txt
+          pip install .[all]
+          pip freeze
+
+      - name: Run tests
+        run: |
+          ./run-tests.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/.gitignore 
new/dictdiffer-0.9.0/.gitignore
--- old/dictdiffer-0.8.1/.gitignore     2019-12-13 08:26:29.000000000 +0100
+++ new/dictdiffer-0.9.0/.gitignore     2021-07-22 15:24:20.000000000 +0200
@@ -16,7 +16,6 @@
 .coverage
 .tox
 build/
-dictdiffer/version.py
 dist/
 docs/_build
 docs/db
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/.travis.yml 
new/dictdiffer-0.9.0/.travis.yml
--- old/dictdiffer-0.8.1/.travis.yml    2019-12-13 08:26:29.000000000 +0100
+++ new/dictdiffer-0.9.0/.travis.yml    1970-01-01 01:00:00.000000000 +0100
@@ -1,53 +0,0 @@
-# This file is part of Dictdiffer.
-#
-# Copyright (C) 2014, 2016 CERN.
-# Copyright (C) 2017 ETH Zurich, Swiss Data Science Center, Jiri Kuncar.
-#
-# Dictdiffer is free software; you can redistribute it and/or modify
-# it under the terms of the MIT License; see LICENSE file for more
-# details.
-
-sudo: false
-
-language: python
-
-cache:
-  - pip
-
-python:
-  - "2.7"
-  - "3.4"
-  - "3.5"
-  - "3.6"
-
-matrix:
-  include:
-    - python: "3.7"
-      os: linux
-      dist: xenial
-
-before_install:
-  - "travis_retry pip install --upgrade pip setuptools py"
-  - "travis_retry pip install twine wheel coveralls requirements-builder"
-
-install:
-  - "travis_retry pip install -e .[all]"
-
-script:
-  - "./run-tests.sh"
-
-after_success:
-  - coveralls
-
-notifications:
-  email: false
-
-deploy:
-  provider: pypi
-  user: jirikuncar
-  password:
-    secure: 
tntrBrJuE3sqJcLxxbzPGj6zltrP/7GgSOFt7q/wn20JWc1SHhutkFqzO2DMShT4YZBlCwwL4jCLsVdMtARCsBIh/p2glTDLFAKC7DfSqwzsnGk/6Q5uyB7NOn7/GPXItyGEJB8cb6QgsMlpMCqv7+mjrL8+HhWVCaZz4B9lzeY=
-  distributions: "sdist bdist_wheel"
-  on:
-    tags: true
-    repo: inveniosoftware/dictdiffer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/CHANGES new/dictdiffer-0.9.0/CHANGES
--- old/dictdiffer-0.8.1/CHANGES        2019-12-13 08:26:29.000000000 +0100
+++ new/dictdiffer-0.9.0/CHANGES        2021-07-22 15:24:20.000000000 +0200
@@ -1,6 +1,14 @@
 Changes
 =======
 
+Version 0.9.0 (released 2021-07-22)
+
+- Adds absolute tolerance feature for floats  (@adrien-berchet) (#152)
+- Drops support of Python<3.5  (@adrien-berchet) (#160)
+- Adds `assert_no_diff` helper to assist pytest users  (@joesolly) (#153)
+- Migrates CI to gh-actions (@ParthS007 @diegodelemos) (#145)
+- Removes dependency on pkg_resources (@eldruin)
+
 Version 0.8.1 (released 2019-12-13)
 
 - Fix invalid diff output for sets. (@jirikuncar @danielduhh)  (#133 #134)
@@ -84,7 +92,7 @@
 - Fix for issues with strings handled as iterables. (#6)
 - Fix for integer keys. (#12)
 - Regression test for complex dictionaries. (#4)
-- Better testing with Travis CI, tox, pytest, code coverage. (#10)
+- Better testing with Github actions, tox, pytest, code coverage. (#10)
 - Initial release of documentation on ReadTheDocs. (#21 #24)
 - Support for Python 3. (#15)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/MANIFEST.in 
new/dictdiffer-0.9.0/MANIFEST.in
--- old/dictdiffer-0.8.1/MANIFEST.in    2019-12-13 08:26:29.000000000 +0100
+++ new/dictdiffer-0.9.0/MANIFEST.in    2021-07-22 15:24:20.000000000 +0200
@@ -13,3 +13,4 @@
 include docs/*.rst docs/*.py docs/Makefile docs/requirements.txt
 include *.py *.sh
 include tox.ini tests/*.py
+recursive-include .github/workflows *.yml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/PKG-INFO 
new/dictdiffer-0.9.0/PKG-INFO
--- old/dictdiffer-0.8.1/PKG-INFO       2019-12-13 08:27:17.000000000 +0100
+++ new/dictdiffer-0.9.0/PKG-INFO       2021-07-22 15:24:24.415362100 +0200
@@ -1,19 +1,19 @@
 Metadata-Version: 2.1
 Name: dictdiffer
-Version: 0.8.1
+Version: 0.9.0
 Summary: Dictdiffer is a library that helps you to diff and patch dictionaries.
 Home-page: https://github.com/inveniosoftware/dictdiffer
 Author: Invenio Collaboration
 Author-email: [email protected]
 License: UNKNOWN
+Project-URL: Changelog, 
https://github.com/inveniosoftware/dictdiffer/blob/master/CHANGES
 Project-URL: Docs, https://dictdiffer.rtfd.io/
-Project-URL: Changelog, 
https://github.com/inveniosoftware/dictdifferblob/master/CHANGES
 Description: ============
          Dictdiffer
         ============
         
-        .. image:: https://img.shields.io/travis/inveniosoftware/dictdiffer.svg
-                :target: https://travis-ci.org/inveniosoftware/dictdiffer
+        .. image:: 
https://github.com/inveniosoftware/dictdiffer/workflows/CI/badge.svg
+                :target: https://github.com/inveniosoftware/dictdiffer/actions
         
         .. image:: 
https://img.shields.io/coveralls/inveniosoftware/dictdiffer.svg
                 :target: https://coveralls.io/r/inveniosoftware/dictdiffer
@@ -45,7 +45,7 @@
         Documentation
         =============
         
-        Documentation is readable at http://dictdiffer.readthedocs.io or can be
+        Documentation is readable at https://dictdiffer.readthedocs.io or can 
be
         built using Sphinx: ::
         
             pip install dictdiffer[docs]
@@ -60,19 +60,18 @@
             ./run-tests.sh
         
 Platform: UNKNOWN
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: MIT License
 Classifier: Operating System :: OS Independent
 Classifier: Topic :: Utilities
 Provides-Extra: docs
-Provides-Extra: tests
 Provides-Extra: numpy
+Provides-Extra: tests
 Provides-Extra: all
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/README.rst 
new/dictdiffer-0.9.0/README.rst
--- old/dictdiffer-0.8.1/README.rst     2019-12-13 08:26:29.000000000 +0100
+++ new/dictdiffer-0.9.0/README.rst     2021-07-22 15:24:20.000000000 +0200
@@ -2,8 +2,8 @@
  Dictdiffer
 ============
 
-.. image:: https://img.shields.io/travis/inveniosoftware/dictdiffer.svg
-        :target: https://travis-ci.org/inveniosoftware/dictdiffer
+.. image:: https://github.com/inveniosoftware/dictdiffer/workflows/CI/badge.svg
+        :target: https://github.com/inveniosoftware/dictdiffer/actions
 
 .. image:: https://img.shields.io/coveralls/inveniosoftware/dictdiffer.svg
         :target: https://coveralls.io/r/inveniosoftware/dictdiffer
@@ -35,7 +35,7 @@
 Documentation
 =============
 
-Documentation is readable at http://dictdiffer.readthedocs.io or can be
+Documentation is readable at https://dictdiffer.readthedocs.io or can be
 built using Sphinx: ::
 
     pip install dictdiffer[docs]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/dictdiffer/__init__.py 
new/dictdiffer-0.9.0/dictdiffer/__init__.py
--- old/dictdiffer-0.8.1/dictdiffer/__init__.py 2019-12-13 08:26:29.000000000 
+0100
+++ new/dictdiffer-0.9.0/dictdiffer/__init__.py 2021-07-22 15:24:20.000000000 
+0200
@@ -10,12 +10,10 @@
 
 """Dictdiffer is a helper module to diff and patch dictionaries."""
 
+from collections.abc import (Iterable, MutableMapping, MutableSequence,
+                             MutableSet)
 from copy import deepcopy
 
-import pkg_resources
-
-from ._compat import (PY2, Iterable, MutableMapping, MutableSequence,
-                      MutableSet, string_types, text_type)
 from .utils import EPSILON, PathLimit, are_different, dot_lookup
 from .version import __version__
 
@@ -29,19 +27,15 @@
 SET_TYPES = (MutableSet, )
 
 try:
-    pkg_resources.get_distribution('numpy')
-except pkg_resources.DistributionNotFound:  # pragma: no cover
-    HAS_NUMPY = False
-else:
-    HAS_NUMPY = True
-
     import numpy
-
+    HAS_NUMPY = True
     LIST_TYPES += (numpy.ndarray, )
+except ImportError:  # pragma: no cover
+    HAS_NUMPY = False
 
 
 def diff(first, second, node=None, ignore=None, path_limit=None, expand=False,
-         tolerance=EPSILON, dot_notation=True):
+         tolerance=EPSILON, absolute_tolerance=None, dot_notation=True):
     """Compare two dictionary/list/set objects, and returns a diff result.
 
     Return an iterator with differences between two objects. The diff items
@@ -105,6 +99,8 @@
                        object to limit the diff recursion depth.
     :param expand: Expand the patches.
     :param tolerance: Threshold to consider when comparing two float numbers.
+    :param absolute_tolerance: Absolute threshold to consider when comparing
+                               two float numbers.
     :param dot_notation: Boolean to toggle dot notation on and off.
 
     .. versionchanged:: 0.3
@@ -134,7 +130,7 @@
                 return value,
             elif isinstance(value, list):
                 return tuple(value)
-            elif not dot_notation and isinstance(value, string_types):
+            elif not dot_notation and isinstance(value, str):
                 return value,
             return value
 
@@ -143,7 +139,7 @@
     def dotted(node, default_type=list):
         """Return dotted notation."""
         if dot_notation and \
-            all(map(lambda x: isinstance(x, string_types) and '.' not in x,
+            all(map(lambda x: isinstance(x, str) and '.' not in x,
                 node)):
             return '.'.join(node)
         else:
@@ -272,7 +268,7 @@
 
         else:
             # Compare string and numerical types and yield `change` flag.
-            if are_different(_first, _second, tolerance):
+            if are_different(_first, _second, tolerance, absolute_tolerance):
                 yield CHANGE, dotted_node, (deepcopy(_first),
                                             deepcopy(_second))
 
@@ -305,7 +301,7 @@
 
     def change(node, changes):
         dest = dot_lookup(destination, node, parent=True)
-        if isinstance(node, string_types):
+        if isinstance(node, str):
             last_node = node.split('.')[-1]
         else:
             last_node = node[-1]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/dictdiffer/_compat.py 
new/dictdiffer-0.9.0/dictdiffer/_compat.py
--- old/dictdiffer-0.8.1/dictdiffer/_compat.py  2019-12-13 08:26:29.000000000 
+0100
+++ new/dictdiffer-0.9.0/dictdiffer/_compat.py  1970-01-01 01:00:00.000000000 
+0100
@@ -1,31 +0,0 @@
-# This file is part of Dictdiffer.
-#
-# Copyright (C) 2015, 2016 CERN.
-#
-# Dictdiffer is free software; you can redistribute it and/or modify
-# it under the terms of the MIT License; see LICENSE file for more
-# details.
-
-"""Python compatibility definitions."""
-
-try:
-    PY2 = True
-    string_types = basestring,
-    text_type = unicode
-    num_types = int, long, float
-except NameError:
-    PY2 = False
-    string_types = str,
-    text_type = str
-    num_types = int, float
-
-if PY2:
-    from collections import (
-        MutableMapping, MutableSet, MutableSequence, Iterable)
-    from itertools import izip_longest as _zip_longest
-else:
-    from collections.abc import (
-        MutableMapping, MutableSet, MutableSequence, Iterable)
-    from itertools import zip_longest as _zip_longest
-
-izip_longest = _zip_longest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/dictdiffer/testing.py 
new/dictdiffer-0.9.0/dictdiffer/testing.py
--- old/dictdiffer-0.8.1/dictdiffer/testing.py  1970-01-01 01:00:00.000000000 
+0100
+++ new/dictdiffer-0.9.0/dictdiffer/testing.py  2021-07-22 15:24:20.000000000 
+0200
@@ -0,0 +1,36 @@
+# This file is part of Dictdiffer.
+#
+# Copyright (C) 2021 CERN.
+#
+# Dictdiffer is free software; you can redistribute it and/or modify
+# it under the terms of the MIT License; see LICENSE file for more
+# details.
+"""Define helper functions for testing."""
+
+from pprint import pformat
+
+from . import diff
+
+
+def assert_no_diff(*args, **kwargs):
+    """Compare two dictionary/list/set objects and raise error on difference.
+
+    When there is a difference, this will print a formatted diff.
+    This is especially useful for pytest.
+
+    Usage example:
+
+        >>> from dictdiffer.testing import assert_no_diff
+        >>> result = {'a': 'b'}
+        >>> expected = {'a': 'c'}
+        >>> assert_no_diff(result, expected)
+        Traceback (most recent call last):
+          File "<stdin>", line 1, in <module>
+          File "<stdin>", line 14, in assert_no_diff
+        AssertionError: [('change', 'a', ('b', 'c'))]
+
+    :param args: Positional arguments to the ``diff`` function.
+    :param second: Named arguments to the ``diff`` function.
+    """
+    d = [d for d in diff(*args, **kwargs)]
+    assert not d, pformat(d)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/dictdiffer/utils.py 
new/dictdiffer-0.9.0/dictdiffer/utils.py
--- old/dictdiffer-0.8.1/dictdiffer/utils.py    2019-12-13 08:26:29.000000000 
+0100
+++ new/dictdiffer-0.9.0/dictdiffer/utils.py    2021-07-22 15:24:20.000000000 
+0200
@@ -9,10 +9,11 @@
 
 """Utils gathers helper functions, classes for the dictdiffer module."""
 
+import math
 import sys
+from itertools import zip_longest
 
-from ._compat import izip_longest, num_types, string_types
-
+num_types = int, float
 EPSILON = sys.float_info.epsilon
 
 
@@ -156,7 +157,7 @@
     >>> create_dotted_node( ['foo', 'bar', 'baz'] )
     'foo.bar.baz'
     """
-    if all(map(lambda x: isinstance(x, string_types), node)):
+    if all(map(lambda x: isinstance(x, str), node)):
         return '.'.join(node)
     else:
         return list(node)
@@ -165,7 +166,7 @@
 def get_path(patch):
     """Return the path for a given dictdiffer.diff patch."""
     if patch[1] != '':
-        keys = (patch[1].split('.') if isinstance(patch[1], string_types)
+        keys = (patch[1].split('.') if isinstance(patch[1], str)
                 else patch[1])
     else:
         keys = []
@@ -189,7 +190,7 @@
         False
     """
     return all(map(lambda x: x[0] == x[1] or x[0] is None,
-                   izip_longest(path1, path2)))
+                   zip_longest(path1, path2)))
 
 
 def nested_hash(obj):
@@ -235,7 +236,7 @@
         return source
 
     value = source
-    if isinstance(lookup, string_types):
+    if isinstance(lookup, str):
         keys = lookup.split('.')
     elif isinstance(lookup, list):
         keys = lookup
@@ -252,7 +253,7 @@
     return value
 
 
-def are_different(first, second, tolerance):
+def are_different(first, second, tolerance, absolute_tolerance=None):
     """Check if 2 values are different.
 
     In case of numerical values, the tolerance is used to check if the values
@@ -270,6 +271,11 @@
         return not (first_is_nan and second_is_nan)
     elif isinstance(first, num_types) and isinstance(second, num_types):
         # two numerical values are compared with tolerance
-        return abs(first-second) > tolerance * max(abs(first), abs(second))
+        return not math.isclose(
+            first,
+            second,
+            rel_tol=tolerance or 0,
+            abs_tol=absolute_tolerance or 0,
+        )
     # we got different values
     return True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/dictdiffer/version.py 
new/dictdiffer-0.9.0/dictdiffer/version.py
--- old/dictdiffer-0.8.1/dictdiffer/version.py  2019-12-13 08:27:17.000000000 
+0100
+++ new/dictdiffer-0.9.0/dictdiffer/version.py  2021-07-22 15:24:24.000000000 
+0200
@@ -3,4 +3,4 @@
 # setup.py and docs/conf.py
 """Version information for dictdiffer package."""
 
-__version__ = '0.8.1'
+__version__ = '0.9.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/dictdiffer.egg-info/PKG-INFO 
new/dictdiffer-0.9.0/dictdiffer.egg-info/PKG-INFO
--- old/dictdiffer-0.8.1/dictdiffer.egg-info/PKG-INFO   2019-12-13 
08:27:17.000000000 +0100
+++ new/dictdiffer-0.9.0/dictdiffer.egg-info/PKG-INFO   2021-07-22 
15:24:24.000000000 +0200
@@ -1,19 +1,19 @@
 Metadata-Version: 2.1
 Name: dictdiffer
-Version: 0.8.1
+Version: 0.9.0
 Summary: Dictdiffer is a library that helps you to diff and patch dictionaries.
 Home-page: https://github.com/inveniosoftware/dictdiffer
 Author: Invenio Collaboration
 Author-email: [email protected]
 License: UNKNOWN
+Project-URL: Changelog, 
https://github.com/inveniosoftware/dictdiffer/blob/master/CHANGES
 Project-URL: Docs, https://dictdiffer.rtfd.io/
-Project-URL: Changelog, 
https://github.com/inveniosoftware/dictdifferblob/master/CHANGES
 Description: ============
          Dictdiffer
         ============
         
-        .. image:: https://img.shields.io/travis/inveniosoftware/dictdiffer.svg
-                :target: https://travis-ci.org/inveniosoftware/dictdiffer
+        .. image:: 
https://github.com/inveniosoftware/dictdiffer/workflows/CI/badge.svg
+                :target: https://github.com/inveniosoftware/dictdiffer/actions
         
         .. image:: 
https://img.shields.io/coveralls/inveniosoftware/dictdiffer.svg
                 :target: https://coveralls.io/r/inveniosoftware/dictdiffer
@@ -45,7 +45,7 @@
         Documentation
         =============
         
-        Documentation is readable at http://dictdiffer.readthedocs.io or can be
+        Documentation is readable at https://dictdiffer.readthedocs.io or can 
be
         built using Sphinx: ::
         
             pip install dictdiffer[docs]
@@ -60,19 +60,18 @@
             ./run-tests.sh
         
 Platform: UNKNOWN
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: MIT License
 Classifier: Operating System :: OS Independent
 Classifier: Topic :: Utilities
 Provides-Extra: docs
-Provides-Extra: tests
 Provides-Extra: numpy
+Provides-Extra: tests
 Provides-Extra: all
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/dictdiffer.egg-info/SOURCES.txt 
new/dictdiffer-0.9.0/dictdiffer.egg-info/SOURCES.txt
--- old/dictdiffer-0.8.1/dictdiffer.egg-info/SOURCES.txt        2019-12-13 
08:27:17.000000000 +0100
+++ new/dictdiffer-0.9.0/dictdiffer.egg-info/SOURCES.txt        2021-07-22 
15:24:24.000000000 +0200
@@ -1,7 +1,6 @@
 .coveragerc
 .gitignore
 .lgtm
-.travis.yml
 AUTHORS
 CHANGES
 CONTRIBUTING.rst
@@ -14,11 +13,13 @@
 setup.cfg
 setup.py
 tox.ini
+.github/workflows/pypi-release.yml
+.github/workflows/tests.yml
 dictdiffer/__init__.py
-dictdiffer/_compat.py
 dictdiffer/conflict.py
 dictdiffer/merge.py
 dictdiffer/resolve.py
+dictdiffer/testing.py
 dictdiffer/unify.py
 dictdiffer/utils.py
 dictdiffer/version.py
@@ -36,5 +37,6 @@
 tests/test_dictdiffer.py
 tests/test_merge.py
 tests/test_resolve.py
+tests/test_testing.py
 tests/test_unify.py
 tests/test_utils.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/dictdiffer.egg-info/requires.txt 
new/dictdiffer-0.9.0/dictdiffer.egg-info/requires.txt
--- old/dictdiffer-0.8.1/dictdiffer.egg-info/requires.txt       2019-12-13 
08:27:17.000000000 +0100
+++ new/dictdiffer-0.9.0/dictdiffer.egg-info/requires.txt       2021-07-22 
15:24:24.000000000 +0200
@@ -1,44 +1,86 @@
 
 [all]
-Sphinx>=1.4.4
-sphinx-rtd-theme>=0.1.9
-check-manifest>=0.25
-coverage>=4.0
-isort>=4.2.2
+Sphinx>=3
+sphinx-rtd-theme>=0.2
+check-manifest>=0.42
 mock>=1.3.0
-pydocstyle>=1.0.0
-pytest-cov>=1.8.0
-pytest-pep8>=1.0.6
-pytest>=2.8.0
+pytest-cov>=2.10.1
+pytest-isort>=1.2.0
+sphinx>=3
 tox>=3.7.0
-numpy>=1.11.0
-Sphinx>=1.4.4
-sphinx-rtd-theme>=0.1.9
-check-manifest>=0.25
-coverage>=4.0
-isort>=4.2.2
+Sphinx>=3
+sphinx-rtd-theme>=0.2
+check-manifest>=0.42
 mock>=1.3.0
-pydocstyle>=1.0.0
-pytest-cov>=1.8.0
-pytest-pep8>=1.0.6
-pytest>=2.8.0
+pytest-cov>=2.10.1
+pytest-isort>=1.2.0
+sphinx>=3
 tox>=3.7.0
-numpy>=1.11.0
+
+[all:python_version < "3.7"]
+numpy>=1.13.0
+numpy>=1.13.0
+
+[all:python_version < "3.8"]
+numpy>=1.15.0
+numpy>=1.15.0
+
+[all:python_version < "3.9"]
+numpy>=1.18.0
+numpy>=1.18.0
+
+[all:python_version <= "3.5"]
+pytest==5.4.3
+pytest-pycodestyle>=2
+pytest-pydocstyle>=2
+pytest==5.4.3
+pytest-pycodestyle>=2
+pytest-pydocstyle>=2
+
+[all:python_version > "3.5"]
+pytest>=6
+pytest-pycodestyle>=2.2.0
+pytest-pydocstyle>=2.2.0
+pytest>=6
+pytest-pycodestyle>=2.2.0
+pytest-pydocstyle>=2.2.0
+
+[all:python_version >= "3.9"]
+numpy>=1.20.0
+numpy>=1.20.0
 
 [docs]
-Sphinx>=1.4.4
-sphinx-rtd-theme>=0.1.9
+Sphinx>=3
+sphinx-rtd-theme>=0.2
 
 [numpy]
-numpy>=1.11.0
+
+[numpy:python_version < "3.7"]
+numpy>=1.13.0
+
+[numpy:python_version < "3.8"]
+numpy>=1.15.0
+
+[numpy:python_version < "3.9"]
+numpy>=1.18.0
+
+[numpy:python_version >= "3.9"]
+numpy>=1.20.0
 
 [tests]
-check-manifest>=0.25
-coverage>=4.0
-isort>=4.2.2
+check-manifest>=0.42
 mock>=1.3.0
-pydocstyle>=1.0.0
-pytest-cov>=1.8.0
-pytest-pep8>=1.0.6
-pytest>=2.8.0
+pytest-cov>=2.10.1
+pytest-isort>=1.2.0
+sphinx>=3
 tox>=3.7.0
+
+[tests:python_version <= "3.5"]
+pytest==5.4.3
+pytest-pycodestyle>=2
+pytest-pydocstyle>=2
+
+[tests:python_version > "3.5"]
+pytest>=6
+pytest-pycodestyle>=2.2.0
+pytest-pydocstyle>=2.2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/docs/index.rst 
new/dictdiffer-0.9.0/docs/index.rst
--- old/dictdiffer-0.8.1/docs/index.rst 2019-12-13 08:26:29.000000000 +0100
+++ new/dictdiffer-0.9.0/docs/index.rst 2021-07-22 15:24:20.000000000 +0200
@@ -3,8 +3,8 @@
 ==========
 .. currentmodule:: dictdiffer
 
-.. image:: https://img.shields.io/travis/inveniosoftware/dictdiffer.svg
-        :target: https://travis-ci.org/inveniosoftware/dictdiffer
+.. image:: https://github.com/inveniosoftware/dictdiffer/workflows/CI/badge.svg
+        :target: https://github.com/inveniosoftware/dictdiffer/actions
 
 .. image:: https://img.shields.io/coveralls/inveniosoftware/dictdiffer.svg
         :target: https://coveralls.io/r/inveniosoftware/dictdiffer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/pytest.ini 
new/dictdiffer-0.9.0/pytest.ini
--- old/dictdiffer-0.8.1/pytest.ini     2019-12-13 08:26:29.000000000 +0100
+++ new/dictdiffer-0.9.0/pytest.ini     2021-07-22 15:24:20.000000000 +0200
@@ -7,5 +7,6 @@
 # details.
 
 [pytest]
-pep8ignore = docs/conf.py ALL
-addopts = --pep8 --doctest-glob='*.rst' --doctest-modules --cov=dictdiffer 
--cov-report=term-missing docs tests dictdiffer
+addopts = --isort --pydocstyle --pycodestyle --doctest-glob="*.rst" 
--doctest-modules --cov=dictdiffer --cov-report=term-missing
+testpaths = tests dictdiffer
+filterwarnings = ignore::pytest.PytestDeprecationWarning
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/run-tests.sh 
new/dictdiffer-0.9.0/run-tests.sh
--- old/dictdiffer-0.8.1/run-tests.sh   2019-12-13 08:26:29.000000000 +0100
+++ new/dictdiffer-0.9.0/run-tests.sh   2021-07-22 15:24:20.000000000 +0200
@@ -1,4 +1,5 @@
-#!/bin/sh
+#!/usr/bin/env bash
+# -*- coding: utf-8 -*-
 #
 # This file is part of Dictdiffer.
 #
@@ -10,8 +11,13 @@
 # it under the terms of the MIT License; see LICENSE file for more
 # details.
 
-pydocstyle dictdiffer && \
-isort -rc -c -df **/*.py && \
-check-manifest --ignore ".travis-*,dictdiffer/version.py" && \
-sphinx-build -qnNW docs docs/_build/html && \
-python setup.py test
+# Quit on errors
+set -o errexit
+
+# Quit on unbound symbols
+set -o nounset
+
+python -m check_manifest --ignore ".*-requirements.txt"
+python -m sphinx.cmd.build -qnNW docs docs/_build/html
+python -m pytest
+python -m sphinx.cmd.build -qnNW -b doctest docs docs/_build/doctest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/setup.py 
new/dictdiffer-0.9.0/setup.py
--- old/dictdiffer-0.8.1/setup.py       2019-12-13 08:26:29.000000000 +0100
+++ new/dictdiffer-0.9.0/setup.py       2021-07-22 15:24:20.000000000 +0200
@@ -13,31 +13,36 @@
 from __future__ import absolute_import, print_function
 
 import os
-import re
 
 from setuptools import find_packages, setup
 
 readme = open('README.rst').read()
 
 tests_require = [
-    'check-manifest>=0.25',
-    'coverage>=4.0',
-    'isort>=4.2.2',
+    'check-manifest>=0.42',
     'mock>=1.3.0',
-    'pydocstyle>=1.0.0',
-    'pytest-cov>=1.8.0',
-    'pytest-pep8>=1.0.6',
-    'pytest>=2.8.0',
+    'pytest==5.4.3;python_version<="3.5"',
+    'pytest>=6;python_version>"3.5"',
+    'pytest-cov>=2.10.1',
+    'pytest-isort>=1.2.0',
+    'pytest-pycodestyle>=2;python_version<="3.5"',
+    'pytest-pycodestyle>=2.2.0;python_version>"3.5"',
+    'pytest-pydocstyle>=2;python_version<="3.5"',
+    'pytest-pydocstyle>=2.2.0;python_version>"3.5"',
+    'sphinx>=3',
     'tox>=3.7.0',
 ]
 
 extras_require = {
     'docs': [
-        'Sphinx>=1.4.4',
-        'sphinx-rtd-theme>=0.1.9',
+        'Sphinx>=3',
+        'sphinx-rtd-theme>=0.2',
     ],
     'numpy': [
-        'numpy>=1.11.0',
+        'numpy>=1.13.0;python_version<"3.7"',
+        'numpy>=1.15.0;python_version<"3.8"',
+        'numpy>=1.18.0;python_version<"3.9"',
+        'numpy>=1.20.0;python_version>="3.9"',
     ],
     'tests': tests_require,
 }
@@ -79,7 +84,7 @@
     project_urls={
         'Changelog': (
             'https://github.com/inveniosoftware/dictdiffer'
-            'blob/master/CHANGES'
+            '/blob/master/CHANGES'
         ),
         'Docs': 'https://dictdiffer.rtfd.io/',
     },
@@ -89,13 +94,12 @@
     setup_requires=setup_requires,
     tests_require=tests_require,
     classifiers=[
-        'Programming Language :: Python :: 2',
-        'Programming Language :: Python :: 2.7',
         'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.4',
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: 3.7',
+        'Programming Language :: Python :: 3.8',
+        'Programming Language :: Python :: 3.9',
         'Development Status :: 5 - Production/Stable',
         'Intended Audience :: Developers',
         'License :: OSI Approved :: MIT License',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/tests/test_dictdiffer.py 
new/dictdiffer-0.9.0/tests/test_dictdiffer.py
--- old/dictdiffer-0.8.1/tests/test_dictdiffer.py       2019-12-13 
08:26:29.000000000 +0100
+++ new/dictdiffer-0.9.0/tests/test_dictdiffer.py       2021-07-22 
15:24:20.000000000 +0200
@@ -12,11 +12,11 @@
 
 import unittest
 from collections import OrderedDict
+from collections.abc import MutableMapping, MutableSequence
 
 import pytest
 
 from dictdiffer import HAS_NUMPY, diff, dot_lookup, patch, revert, swap
-from dictdiffer._compat import MutableMapping, MutableSequence, MutableSet
 from dictdiffer.utils import PathLimit
 
 
@@ -104,6 +104,54 @@
         diffed = next(diff(first, second, tolerance=0.01))
         assert ('change', 'a', (10.0, 10.5)) == diffed
 
+        first = {'a': 10.0, 'b': 1.0e-15}
+        second = {'a': 10.5, 'b': 2.5e-15}
+        diffed = sorted(diff(
+            first, second, tolerance=0.01
+        ))
+        assert [
+            ('change', 'a', (10.0, 10.5)),
+            ('change', 'b', (1.0e-15, 2.5e-15)),
+        ] == diffed
+
+        diffed = sorted(diff(
+            first, second, tolerance=0.01, absolute_tolerance=1e-12
+        ))
+        assert [('change', 'a', (10.0, 10.5))] == diffed
+
+        diffed = sorted(diff(
+            first, second, tolerance=0.01, absolute_tolerance=1e-18
+        ))
+        assert [
+            ('change', 'a', (10.0, 10.5)),
+            ('change', 'b', (1.0e-15, 2.5e-15)),
+        ] == diffed
+
+        diffed = sorted(diff(
+            first, second, tolerance=0.1, absolute_tolerance=1e-18
+        ))
+        assert [('change', 'b', (1.0e-15, 2.5e-15))] == diffed
+
+        diffed = sorted(diff(
+            first, second, tolerance=0.1, absolute_tolerance=1e-12
+        ))
+        assert [] == diffed
+
+        diffed = sorted(diff(
+            first, second, tolerance=None, absolute_tolerance=None
+        ))
+        assert [
+            ('change', 'a', (10.0, 10.5)),
+            ('change', 'b', (1.0e-15, 2.5e-15)),
+        ] == diffed
+
+        first = {'a': 10.0, 'b': 1.0e-15}
+        second = {'a': 10.0, 'b': 1.0e-15}
+        diffed = sorted(diff(
+            first, second, tolerance=None, absolute_tolerance=None
+        ))
+        assert [] == diffed
+
     def test_path_limit_as_list(self):
         first = {}
         second = {'author': {'last_name': 'Doe', 'first_name': 'John'}}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/tests/test_testing.py 
new/dictdiffer-0.9.0/tests/test_testing.py
--- old/dictdiffer-0.8.1/tests/test_testing.py  1970-01-01 01:00:00.000000000 
+0100
+++ new/dictdiffer-0.9.0/tests/test_testing.py  2021-07-22 15:24:20.000000000 
+0200
@@ -0,0 +1,25 @@
+# This file is part of Dictdiffer.
+#
+# Copyright (C) 2021 CERN.
+#
+# Dictdiffer is free software; you can redistribute it and/or modify
+# it under the terms of the MIT License; see LICENSE file for more
+# details.
+
+import unittest
+
+import pytest
+
+from dictdiffer.testing import assert_no_diff
+
+
+class AssertNoDiffTest(unittest.TestCase):
+    def test_passes(self):
+        dict1 = {1: '1'}
+        assert_no_diff(dict1, dict1)
+
+    def test_raises_assertion_error(self):
+        dict1 = {1: '1'}
+        dict2 = {2: '2'}
+        with pytest.raises(AssertionError):
+            assert_no_diff(dict1, dict2)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dictdiffer-0.8.1/tox.ini new/dictdiffer-0.9.0/tox.ini
--- old/dictdiffer-0.8.1/tox.ini        2019-12-13 08:26:29.000000000 +0100
+++ new/dictdiffer-0.9.0/tox.ini        2021-07-22 15:24:20.000000000 +0200
@@ -8,10 +8,12 @@
 # details.
 
 [tox]
-envlist = py27, py34, py35, py36
+envlist = py35, py36, py37, py38, py39
 
 [testenv]
-deps = pytest
-       pytest-cov
-       pytest-pep8
-commands = {envpython} setup.py test
+extras = numpy, tests
+commands =
+    {envpython} -m check_manifest --ignore ".*-requirements.txt"
+    {envpython} -m sphinx.cmd.build -qnNW docs docs/_build/html
+    {envpython} setup.py test
+    {envpython} -m sphinx.cmd.build -qnNW -b doctest docs docs/_build/doctest

++++++ lower-reqs.diff ++++++
--- /var/tmp/diff_new_pack.9A4iix/_old  2021-12-16 21:20:56.750558535 +0100
+++ /var/tmp/diff_new_pack.9A4iix/_new  2021-12-16 21:20:56.762558539 +0100
@@ -1,17 +1,17 @@
-Index: dictdiffer-0.8.1/setup.py
+Index: dictdiffer-0.9.0/setup.py
 ===================================================================
---- dictdiffer-0.8.1.orig/setup.py
-+++ dictdiffer-0.8.1/setup.py
-@@ -28,7 +28,7 @@ tests_require = [
-     'pytest-cov>=1.8.0',
-     'pytest-pep8>=1.0.6',
-     'pytest>=2.8.0',
+--- dictdiffer-0.9.0.orig/setup.py     2021-07-22 15:24:20.000000000 +0200
++++ dictdiffer-0.9.0/setup.py  2021-12-14 14:19:30.354291584 +0100
+@@ -30,7 +30,7 @@ tests_require = [
+     'pytest-pydocstyle>=2;python_version<="3.5"',
+     'pytest-pydocstyle>=2.2.0;python_version>"3.5"',
+     'sphinx>=3',
 -    'tox>=3.7.0',
 +    'tox>=2.9.0',
  ]
  
  extras_require = {
-@@ -50,7 +50,7 @@ for key, reqs in extras_require.items():
+@@ -55,7 +55,7 @@ for key, reqs in extras_require.items():
  
  setup_requires = [
      'pytest-runner>=2.7',

Reply via email to