From 2640afa8120c1c33c722bc50f3420d8a0bb146e7 Mon Sep 17 00:00:00 2001 From: abrichr Date: Mon, 23 Nov 2026 03:18:12 -0500 Subject: [PATCH] fix(tests): read pyproject with tomli on Python 3.10 The wrap extra lean-install check imported tomllib unconditionally. tomllib is stdlib only on 3.11+, so Python CI run-ci on ubuntu 3.10 failed deterministically after #2406. Use the same tomllib/tomli fallback as the other launcher tests. Assertions are unchanged. --- tests/test_wrap_command.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_wrap_command.py b/tests/test_wrap_command.py index 42bde72e2f..d6ea34f58e 100644 --- a/tests/test_wrap_command.py +++ b/tests/test_wrap_command.py @@ -44,7 +44,10 @@ def test_the_wrap_extra_brings_the_built_in_agent_sdk_and_the_base_stays_lean(): # the base launcher install must not pull its SDK. from pathlib import Path - import tomllib + try: + import tomllib + except ModuleNotFoundError: # pragma: no cover - exercised on Python 3.10 CI + import tomli as tomllib project = tomllib.loads( (Path(__file__).resolve().parents[1] / "pyproject.toml").read_text()