From 51d2d0f11003166baa85b1b7017f0cc4fa0bae7d Mon Sep 17 00:00:00 2001 From: Alexandre Detiste Date: Thu, 27 Nov 2025 23:41:52 +0100 Subject: [PATCH 1/2] replace usage of older "toml" with current "tomli" "tomli" got later merged in the standard library as "tomllib" --- pyproject.toml | 2 +- tasks.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 84098cb408..99f8b2dc47 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ pytest = "*" pyyaml = "*" pydocstyle = "*" sphinx-rtd-theme = "*" -toml = "*" +tomli = "*" yamllint = "*" "ruamel.yaml" = "*" mkdocs = "1.6.0" diff --git a/tasks.py b/tasks.py index 6a2f74331f..647281c2a5 100644 --- a/tasks.py +++ b/tasks.py @@ -5,7 +5,7 @@ from invoke import task try: - import toml + import tomli except ImportError: sys.exit("Please make sure to `pip install toml` or enable the Poetry shell and run `poetry install`.") @@ -49,7 +49,8 @@ def is_truthy(arg): return bool(strtobool(arg)) -PYPROJECT_CONFIG = toml.load("pyproject.toml") +with open("pyproject.toml", "rb") as fd: + PYPROJECT_CONFIG = tomli.load(fd) TOOL_CONFIG = PYPROJECT_CONFIG["tool"]["poetry"] # Can be set to a separate Python version to be used for launching or building image From 9d86279dac4c9308b4dfd8aae5baf4ae4fcb88e0 Mon Sep 17 00:00:00 2001 From: Michael Bear <38406045+mjbear@users.noreply.github.com> Date: Fri, 28 Nov 2025 12:39:11 -0500 Subject: [PATCH 2/2] Update error message in tasks.py --- tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks.py b/tasks.py index 647281c2a5..dab2c1491c 100644 --- a/tasks.py +++ b/tasks.py @@ -7,7 +7,7 @@ try: import tomli except ImportError: - sys.exit("Please make sure to `pip install toml` or enable the Poetry shell and run `poetry install`.") + sys.exit("Please make sure to `pip install tomli` or enable the Poetry shell and run `poetry install`.") def strtobool(val: str) -> bool: