diff --git a/tests/test_app.py b/tests/test_app.py index eecb0af..721e025 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -6,7 +6,7 @@ import subprocess import sys -import toml +import tomllib from lib.lib_package_linter import ( Error, Info, @@ -564,7 +564,7 @@ def config_panel(app): yield from validate_schema( "config_panel", json.loads(config_panel_v1_schema()), - toml.load(app.path + "/config_panel.toml"), + tomllib.load(open(app.path + "/config_panel.toml", "rb")), ) @test() diff --git a/tests/test_catalog.py b/tests/test_catalog.py index fe52f0c..452359b 100644 --- a/tests/test_catalog.py +++ b/tests/test_catalog.py @@ -7,7 +7,7 @@ import time from datetime import datetime -import toml +import tomllib from lib.lib_package_linter import ( Critical, Error, @@ -42,7 +42,7 @@ def __init__(self, app_id): self._fetch_app_repo() try: - self.app_list = toml.loads(open("./.apps/apps.toml").read()) + self.app_list = tomllib.load(open("./.apps/apps.toml", "rb")) except Exception: _print("Failed to read apps.toml :/") sys.exit(-1) @@ -205,7 +205,7 @@ def get_history(N): elif os.system(f"git -C ./.apps cat-file -e {commit}:apps.toml") == 0: raw_catalog_at_this_date = git(["show", f"{commit}:apps.toml"]) - loader = toml + loader = tomllib else: raise Exception("No apps.json/toml at this point in history?") diff --git a/tests/test_configurations.py b/tests/test_configurations.py index 2b94b12..fa5e510 100644 --- a/tests/test_configurations.py +++ b/tests/test_configurations.py @@ -5,7 +5,7 @@ import re import subprocess -import toml +import tomllib from lib.lib_package_linter import ( Error, Info, @@ -49,7 +49,7 @@ def tests_toml(self): yield from validate_schema( "tests.toml", json.loads(tests_v1_schema()), - toml.load(app.path + "/tests.toml"), + tomllib.load(open(app.path + "/tests.toml", "rb")), ) @test() diff --git a/tests/test_manifest.py b/tests/test_manifest.py index f068e87..c570726 100644 --- a/tests/test_manifest.py +++ b/tests/test_manifest.py @@ -6,7 +6,7 @@ import re import sys -import toml +import tomllib from lib.lib_package_linter import ( Critical, Error, @@ -89,7 +89,7 @@ def check_for_duplicate_keys(ordered_pairs): self.raw_manifest = open(manifest_path, encoding="utf-8").read() try: - self.manifest = toml.loads(self.raw_manifest) + self.manifest = tomllib.loads(self.raw_manifest) except Exception as e: print( c.FAIL