diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-11-25 22:39:15 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-11-25 22:39:15 +0000 |
commit | d934827bf44b7cfcf6711964418148fa60877668 (patch) | |
tree | 0625f358789b5e015e49db139cc1dbc9be00428f /dev-python/libnacl/files | |
parent | 2e34d110f164bf74d55fced27fe0000201b3eec5 (diff) |
gentoo resync : 25.11.2020
Diffstat (limited to 'dev-python/libnacl/files')
-rw-r--r-- | dev-python/libnacl/files/libnacl-1.7.1-py39.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/dev-python/libnacl/files/libnacl-1.7.1-py39.patch b/dev-python/libnacl/files/libnacl-1.7.1-py39.patch new file mode 100644 index 000000000000..62fc1e30258d --- /dev/null +++ b/dev-python/libnacl/files/libnacl-1.7.1-py39.patch @@ -0,0 +1,35 @@ +commit 53c1576b21b53156fc30d357b40c88c7eefb50de +Author: Karthikeyan Singaravelan <tir.karthi@gmail.com> +Date: Thu Jan 30 22:22:58 2020 +0530 + + Remove encoding parameter json.loads for Python 3.9 compatibility. + +diff --git a/libnacl/utils.py b/libnacl/utils.py +index 412d518..e06e078 100644 +--- a/libnacl/utils.py ++++ b/libnacl/utils.py +@@ -1,6 +1,7 @@ + # -*- coding: utf-8 -*- + + import struct ++import sys + import time + + # Import nacl libs +@@ -31,7 +32,10 @@ def load_key(path_or_file, serial='json'): + key_data = msgpack.load(stream) + elif serial == 'json': + import json +- key_data = json.loads(stream.read(), encoding='UTF-8') ++ if sys.version_info[0] >= 3: ++ key_data = json.loads(stream.read()) ++ else: ++ key_data = json.loads(stream.read(), encoding='UTF-8') + finally: + if stream != path_or_file: + stream.close() +@@ -95,4 +99,3 @@ def time_nonce(): + ''' + nonce = rand_nonce() + return (struct.pack('=d', time.time()) + nonce)[:len(nonce)] +- |