From 116a085a8db485bc0810fde3761d55d882fdd129 Mon Sep 17 00:00:00 2001 From: Simon Chuang Date: Wed, 17 Aug 2022 14:45:15 +0800 Subject: [PATCH] base64.encodestring to base64.encodebytes base64.encodestring() deprecated since Python 3.1. --- examples/rest_api/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/rest_api/utils.py b/examples/rest_api/utils.py index 46b8be9..e0731c6 100755 --- a/examples/rest_api/utils.py +++ b/examples/rest_api/utils.py @@ -79,7 +79,7 @@ def setup_logging() -> None: def setup_connection(api_user: str, api_pass: str): """Configure the default connection for the application""" - base64string = base64.encodestring( + base64string = base64.encodebytes( ('%s:%s' % (api_user, api_pass)).encode()).decode().replace('\n', '')