diff --git a/pyFAI/gui/utils/ProxyAction.py b/pyFAI/gui/utils/ProxyAction.py index 6b807e020..193283234 100644 --- a/pyFAI/gui/utils/ProxyAction.py +++ b/pyFAI/gui/utils/ProxyAction.py @@ -25,9 +25,10 @@ __authors__ = ["V. Valls"] __license__ = "MIT" -__date__ = "16/10/2020" +__date__ = "05/10/2023" -from distutils.version import LooseVersion +def LooseVersion(version): + return tuple(int(i) for i in version.split(".") if i.isdecimal()) from silx.gui import qt diff --git a/pyFAI/test/test_calibrant.py b/pyFAI/test/test_calibrant.py index dbd365daf..e4542ca0a 100644 --- a/pyFAI/test/test_calibrant.py +++ b/pyFAI/test/test_calibrant.py @@ -146,13 +146,13 @@ def test_not_same_dspace(self): # this 2 calibrant must only be used there to test the lazy-loading c1 = get_calibrant("LaB6_SRM660a") c2 = get_calibrant("LaB6_SRM660b") - self.assertNotEquals(c1, c2) + self.assertNotEqual(c1, c2) def test_not_same_wavelength(self): c1 = get_calibrant("LaB6") c1.set_wavelength(1e-10) c2 = get_calibrant("LaB6") - self.assertNotEquals(c1, c2) + self.assertNotEqual(c1, c2) def test_copy(self): c1 = get_calibrant("AgBh") @@ -160,7 +160,7 @@ def test_copy(self): self.assertIsNot(c1, c2) self.assertEqual(c1, c2) c2.set_wavelength(1e-10) - self.assertNotEquals(c1, c2) + self.assertNotEqual(c1, c2) def test_hash(self): c1 = get_calibrant("AgBh")