From 61f528d9b32cb07e5297f02418cde237f772c646 Mon Sep 17 00:00:00 2001 From: Hendrik Wiese Date: Sun, 9 Jun 2024 10:20:19 +0200 Subject: [PATCH] fix: Use files instead of open_binary open_binary is deprecated Co-authored-by: chayleaf --- maubot/cli/util/spdx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maubot/cli/util/spdx.py b/maubot/cli/util/spdx.py index 4508e26..1cae7a5 100644 --- a/maubot/cli/util/spdx.py +++ b/maubot/cli/util/spdx.py @@ -27,7 +27,7 @@ def load() -> None: global spdx_list if spdx_list is not None: return - with resources.open_binary("maubot.cli", "res/spdx.json.zip") as disk_file: + with resources.files("maubot.cli").joinpath("res/spdx.json.zip").open("rb") as disk_file: with zipfile.ZipFile(disk_file) as zip_file: with zip_file.open("spdx.json") as file: spdx_list = json.load(file)