diff --git a/src/diffpy/srfit/fitbase/fitrecipe.py b/src/diffpy/srfit/fitbase/fitrecipe.py index 8ed636e4..c367f78b 100644 --- a/src/diffpy/srfit/fitbase/fitrecipe.py +++ b/src/diffpy/srfit/fitbase/fitrecipe.py @@ -179,7 +179,7 @@ def addContribution(self, con, weight = 1.0): def setWeight(self, con, weight): """Set the weight of a FitContribution.""" - idx = self._contributions.values().index(con) + idx = list(self._contributions.values()).index(con) self._weights[idx] = weight return diff --git a/src/diffpy/srfit/fitbase/fitresults.py b/src/diffpy/srfit/fitbase/fitresults.py index d6508fb8..6cde340d 100644 --- a/src/diffpy/srfit/fitbase/fitresults.py +++ b/src/diffpy/srfit/fitbase/fitresults.py @@ -349,7 +349,7 @@ def formatResults(self, header = "", footer = "", update = False): ## Per-FitContribution results if len(self.conresults) > 1: - keys = self.conresults.keys() + keys = list(self.conresults.keys()) keys.sort(key=numstr) lines.append("") diff --git a/src/diffpy/srfit/tests/testpdf.py b/src/diffpy/srfit/tests/testpdf.py index 43c7266b..426b7d81 100644 --- a/src/diffpy/srfit/tests/testpdf.py +++ b/src/diffpy/srfit/tests/testpdf.py @@ -270,11 +270,6 @@ def test_pickling(self): self.assertTrue(numpy.array_equal(res1, pc2.residual())) return - # TODO: remove after fixup release of diffpy.structure - import sys - if sys.version_info >= (3, 7): - test_pickling = unittest.expectedFailure(test_pickling) - # End of class TestPDFContribution # ----------------------------------------------------------------------------