From 1ee43f4691dc7ab651fd22f07748c237f0301675 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Tue, 2 May 2023 11:28:46 -0600 Subject: Change bas64 decodestring -> decodebytes The former was an alias in Python 3, deprecated since 3.1. Use the replacement. Signed-off-by: Mats Wichmann --- CHANGES.txt | 2 ++ SCons/Tool/msvs.py | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index d0b58368c..72d1aa675 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,6 +17,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER not use these, so was not affected. [fixes #4193] - Simplify some code due to pylint observation: "C2801: Unnecessarily calls dunder method __call__. Invoke instance directly." + - Python 3.9 dropped the alias base64.decodestring, deprecated since 3.1. + Only used in msvs.py. Use base64.decodebytes instead. RELEASE 4.5.2 - Sun, 21 Mar 2023 14:08:29 -0700 diff --git a/SCons/Tool/msvs.py b/SCons/Tool/msvs.py index 86df1ef66..d21803890 100644 --- a/SCons/Tool/msvs.py +++ b/SCons/Tool/msvs.py @@ -777,7 +777,7 @@ class _GenerateV6DSP(_DSPGenerator): # OK, we've found our little pickled cache of data. try: - datas = base64.decodestring(datas) + datas = base64.decodebytes(datas) data = pickle.loads(datas) except KeyboardInterrupt: raise @@ -798,7 +798,7 @@ class _GenerateV6DSP(_DSPGenerator): # OK, we've found our little pickled cache of data. # it has a "# " in front of it, so we strip that. try: - datas = base64.decodestring(datas) + datas = base64.decodebytes(datas) data = pickle.loads(datas) except KeyboardInterrupt: raise @@ -1095,7 +1095,7 @@ class _GenerateV7DSP(_DSPGenerator, _GenerateV7User): # OK, we've found our little pickled cache of data. try: - datas = base64.decodestring(datas) + datas = base64.decodebytes(datas) data = pickle.loads(datas) except KeyboardInterrupt: raise @@ -1115,7 +1115,7 @@ class _GenerateV7DSP(_DSPGenerator, _GenerateV7User): # OK, we've found our little pickled cache of data. try: - datas = base64.decodestring(datas) + datas = base64.decodebytes(datas) data = pickle.loads(datas) except KeyboardInterrupt: raise @@ -1592,7 +1592,7 @@ class _GenerateV7DSW(_DSWGenerator): # OK, we've found our little pickled cache of data. try: - datas = base64.decodestring(datas) + datas = base64.decodebytes(datas) data = pickle.loads(datas) except KeyboardInterrupt: raise -- cgit v1.2.1