From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 61AD3158087 for ; Sun, 30 Jan 2022 20:43:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AC1C62BC021; Sun, 30 Jan 2022 20:43:01 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 90A332BC021 for ; Sun, 30 Jan 2022 20:43:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9A89D342F59 for ; Sun, 30 Jan 2022 20:43:00 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C63BB2CE for ; Sun, 30 Jan 2022 20:42:57 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1643574163.4eb118a8712966079d7651619c7e579dbbee1d30.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, catalyst/, doc/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/base/stagebase.py catalyst/main.py doc/make_subarch_table_guidexml.py X-VCS-Directories: catalyst/base/ catalyst/ doc/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 4eb118a8712966079d7651619c7e579dbbee1d30 X-VCS-Branch: wip/mattst88 Date: Sun, 30 Jan 2022 20:42:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 40f6eee4-c8f6-48f7-9df5-c7fc55c5ee9a X-Archives-Hash: 1a305077ef4c27b92b423b42e6e22f12 commit: 4eb118a8712966079d7651619c7e579dbbee1d30 Author: Matt Turner gentoo org> AuthorDate: Sun Jan 30 20:22:43 2022 +0000 Commit: Matt Turner gentoo org> CommitDate: Sun Jan 30 20:22:43 2022 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4eb118a8 catalyst: Switch to tomli The Python community is coalescing around tomli, and tomli is likely to be integrated into the standard library per PEP680. Signed-off-by: Matt Turner gentoo.org> catalyst/base/stagebase.py | 4 ++-- catalyst/main.py | 4 ++-- doc/make_subarch_table_guidexml.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 4a1b4eb6..ad96beb7 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -10,7 +10,7 @@ from pathlib import Path import fasteners import libmount -import toml +import tomli from snakeoil import fileutils from snakeoil.osutils import pjoin @@ -124,7 +124,7 @@ class StageBase(TargetBase, ClearBase, GenBase): name = x[:-len('.toml')] with open(arch_dir + x) as file: - arch_config = toml.load(file) + arch_config = tomli.load(file) # Search for a subarchitecture in each arch in the arch_config for arch in [x for x in arch_config if x.startswith(name) and host in arch_config[x]]: diff --git a/catalyst/main.py b/catalyst/main.py index 0de1040f..fa668770 100644 --- a/catalyst/main.py +++ b/catalyst/main.py @@ -6,7 +6,7 @@ import os import sys import textwrap -import toml +import tomli from DeComp.definitions import (COMPRESS_DEFINITIONS, DECOMPRESS_DEFINITIONS, CONTENTS_DEFINITIONS) @@ -35,7 +35,7 @@ def parse_config(config_files): for config_file in config_files: log.notice('Loading configuration file: %s', config_file) try: - config = toml.load(config_file) + config = tomli.load(config_file) for key in config: if key not in valid_config_file_values: log.critical("Unknown option '%s' in config file %s", diff --git a/doc/make_subarch_table_guidexml.py b/doc/make_subarch_table_guidexml.py index 67ed3ccc..9507177c 100755 --- a/doc/make_subarch_table_guidexml.py +++ b/doc/make_subarch_table_guidexml.py @@ -5,7 +5,7 @@ import pathlib import sys import textwrap -import toml +import tomli def write_guidexml(arch_to_subarch): @@ -40,7 +40,7 @@ def main(_argv): p = pathlib.Path('arch') for file in p.glob('*.toml'): - data = toml.load(file) + data = tomli.load(file) for arch in [x for x in data if x != 'setarch']: arch_to_subarch.update({arch: list(data[arch].keys())})