test: use tomli fallback for Python 3.10

tomllib is only in the stdlib from 3.11 onward. Fall back to the tomli
shim (already a transitive dep) so the regression test can import on
the 3.10 leg of the test matrix.
This commit is contained in:
devin-ai-integration[bot]
2026-04-17 11:37:43 +00:00
parent d6f161969a
commit c91dc8598c

View File

@@ -8,9 +8,15 @@ to defend against so future maintainers understand why a bound is required.
from __future__ import annotations
import tomllib
import sys
from pathlib import Path
if sys.version_info >= (3, 11):
import tomllib
else:
import tomli as tomllib
import pytest
from packaging.requirements import Requirement
from packaging.specifiers import SpecifierSet