diff --git a/python-datadiff.changes b/python-datadiff.changes index 6c5e481..c57d208 100644 --- a/python-datadiff.changes +++ b/python-datadiff.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jan 10 05:02:55 UTC 2024 - Steve Kowalik + +- Add patch support-python312.patch: + * In Python 3.12, slice() is now hashable, use a class that isn't hashable. +- Switch to pyproject macros. + ------------------------------------------------------------------- Tue Oct 03 08:04:27 UTC 2023 - pgajdos@suse.com diff --git a/python-datadiff.spec b/python-datadiff.spec index 2027343..5ee4e46 100644 --- a/python-datadiff.spec +++ b/python-datadiff.spec @@ -1,7 +1,7 @@ # # spec file for package python-datadiff # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # Copyright (c) 2019, Martin Hauke # # All modifications and additions to the file contributed by third parties @@ -26,9 +26,13 @@ URL: https://sourceforge.net/projects/datadiff/ #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 -# https://sourceforge.net/p/datadiff/code/merge-requests/3/ +# PATCH-FIX-UPSTREAM https://sourceforge.net/p/datadiff/code/merge-requests/3/ Patch0: python-datadiff-no-six.patch +# PATCH-FIX-UPSTREAM https://sourceforge.net/p/datadiff/code/merge-requests/4/ +Patch1: support-python312.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch @@ -50,10 +54,10 @@ a nice data diff is shown, letting you easily pinpoint the root difference. %autosetup -p1 -n datadiff-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -62,6 +66,6 @@ a nice data diff is shown, letting you easily pinpoint the root difference. %files %{python_files} %license LICENSE %{python_sitelib}/datadiff -%{python_sitelib}/datadiff-%{version}*-info +%{python_sitelib}/datadiff-%{version}.dist-info %changelog diff --git a/support-python312.patch b/support-python312.patch new file mode 100644 index 0000000..99d6ad6 --- /dev/null +++ b/support-python312.patch @@ -0,0 +1,18 @@ +Index: datadiff-2.2.0/datadiff/tests/test_datadiff.py +=================================================================== +--- datadiff-2.2.0.orig/datadiff/tests/test_datadiff.py ++++ datadiff-2.2.0/datadiff/tests/test_datadiff.py +@@ -377,8 +377,12 @@ def test_DataDiff_change_type(): + + + def test_unhashable_type(): ++ class UnhashableType: ++ def __eq__(self, other): ++ return False ++ + a = [] +- b = [slice(1)] ++ b = [UnhashableType()] + pytest.raises(NotHashable, diff, a, b) + +