Package: python-apptools / 4.5.0-1.1

fix_python3.9_base64_decodestring_deprecation.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: Fix test against python3.9
   Replace decodestring by decodebytes
Author: Anton Gladky <gladk@debian.org>
Bug-Debian: https://bugs.debian.org/973074
Last-Update: 2020-11-30

--- python-apptools-4.5.0.orig/apptools/persistence/tests/test_state_pickler.py
+++ python-apptools-4.5.0/apptools/persistence/tests/test_state_pickler.py
@@ -148,7 +148,7 @@ class TestDictPickler(unittest.TestCase)
         self._check_instance_and_references(obj, data)
 
         num_attr = 'numeric' if data['numeric']['type'] == 'numeric' else 'ref'
-        decodestring = getattr(base64, 'decodebytes', base64.decodestring)
+        decodestring = getattr(base64, 'decodebytes', base64.decodebytes)
         junk = state_pickler.gunzip_string(
             decodestring(data[num_attr]['data'])
         )