diff --git a/pyproject.toml b/pyproject.toml index b06a30a..e3c0cd5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,9 @@ dev = [ "mcp>=1.0.0", "typer>=0.12.0", "rich>=14.0.0", + # tomllib is stdlib only on 3.11+; scripts/check_git_deps.py needs the + # backport to run under the 3.10 CI matrix leg. + "tomli>=2.0.0; python_version < '3.11'", ] [tool.pytest.ini_options] diff --git a/scripts/check_git_deps.py b/scripts/check_git_deps.py index e97d642..610817b 100644 --- a/scripts/check_git_deps.py +++ b/scripts/check_git_deps.py @@ -22,10 +22,14 @@ from __future__ import annotations import sys -import tomllib from pathlib import Path from typing import Any +if sys.version_info >= (3, 11): + import tomllib +else: # tomllib is stdlib only on 3.11+; tomli is the drop-in backport + import tomli as tomllib + GIT_MARKERS = ("git+", "git://") DEFAULT_PYPROJECT = "pyproject.toml" diff --git a/uv.lock b/uv.lock index de5affa..b5a3d75 100644 --- a/uv.lock +++ b/uv.lock @@ -3056,6 +3056,7 @@ dev = [ { name = "pytest-xdist" }, { name = "rich" }, { name = "ruff" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, { name = "typer" }, { name = "types-requests" }, ] @@ -3085,6 +3086,7 @@ dev = [ { name = "pytest-xdist", specifier = ">=3.5.0" }, { name = "rich", specifier = ">=14.0.0" }, { name = "ruff", specifier = ">=0.8.0" }, + { name = "tomli", marker = "python_full_version < '3.11'", specifier = ">=2.0.0" }, { name = "typer", specifier = ">=0.12.0" }, { name = "types-requests", specifier = ">=2.25.0" }, ]