From 4806c1ee7ee849f171f31a29e030822e7b94ea15 Mon Sep 17 00:00:00 2001 From: Safi Date: Tue, 2 Jun 2026 21:36:53 +0100 Subject: [PATCH] guard the last tomllib import in test_install_references for Python 3.10 Same 3.11+-stdlib issue as gen.py: this test imported tomllib directly, failing the 3.10 job. Fall back to tomli on <3.11. Co-Authored-By: Claude Opus 4.8 --- tests/test_install_references.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_install_references.py b/tests/test_install_references.py index 6975406..07c806b 100644 --- a/tests/test_install_references.py +++ b/tests/test_install_references.py @@ -285,7 +285,10 @@ def test_pyproject_declares_references_globs(): exists; the skill bodies are graphify/skill*.md, listed explicitly), so it was removed. This test guards the real shipped layout. """ - import tomllib + try: + import tomllib # Python 3.11+ stdlib + except ModuleNotFoundError: # Python 3.10 + import tomli as tomllib # type: ignore[no-redef] pyproject = PKG_DIR.parent / "pyproject.toml" if not pyproject.exists():