forked from pool/python-datadiff
- Add patch support-python312.patch:
* In Python 3.12, slice() is now hashable, use a class that isn't hashable. - Switch to pyproject macros. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-datadiff?expand=0&rev=9
This commit is contained in:
18
support-python312.patch
Normal file
18
support-python312.patch
Normal file
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user