diff --git a/apptools/persistence/tests/test_state_pickler.py b/apptools/persistence/tests/test_state_pickler.py index 8d12935e3..a62b553f4 100644 --- a/apptools/persistence/tests/test_state_pickler.py +++ b/apptools/persistence/tests/test_state_pickler.py @@ -157,9 +157,8 @@ def verify(self, obj, state): self._check_instance_and_references(obj, data) num_attr = "numeric" if data["numeric"]["type"] == "numeric" else "ref" - decodestring = getattr(base64, "decodebytes", base64.decodestring) junk = state_pickler.gunzip_string( - decodestring(data[num_attr]["data"]) + base64.decodebytes(data[num_attr]["data"]) ) num = pickle.loads(junk) self.assertEqual(numpy.alltrue(numpy.ravel(num == obj.numeric)), 1) diff --git a/docs/releases/upcoming/210.test.rst b/docs/releases/upcoming/210.test.rst new file mode 100644 index 000000000..867cb2111 --- /dev/null +++ b/docs/releases/upcoming/210.test.rst @@ -0,0 +1 @@ +Fix AttributeError on Python 3.9 due to usage of ``base64.decodestring`` in tests (#210) \ No newline at end of file