From c91dc8598c076ecce3c799ce39a3d7acf57a81e9 Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" Date: Fri, 17 Apr 2026 11:37:43 +0000 Subject: [PATCH] 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. --- lib/crewai/tests/test_dependency_constraints.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/crewai/tests/test_dependency_constraints.py b/lib/crewai/tests/test_dependency_constraints.py index f4dd02324..cda34505a 100644 --- a/lib/crewai/tests/test_dependency_constraints.py +++ b/lib/crewai/tests/test_dependency_constraints.py @@ -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