From 5644211c2a76ac9d9204d2afd7b18f43a353bc14 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 23 Jan 2026 10:24:35 +0000 Subject: [PATCH] fix: use tomli for Python 3.10 compatibility in tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tomllib is only available in Python 3.11+, so we need to use tomli as a fallback for Python 3.10. Co-Authored-By: João --- lib/crewai/tests/test_dependency_constraints.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/crewai/tests/test_dependency_constraints.py b/lib/crewai/tests/test_dependency_constraints.py index e0f59c444..7d0169d4e 100644 --- a/lib/crewai/tests/test_dependency_constraints.py +++ b/lib/crewai/tests/test_dependency_constraints.py @@ -1,8 +1,13 @@ """Test that dependency constraints are compatible with common integrations.""" -import tomllib +import sys from pathlib import Path +if sys.version_info >= (3, 11): + import tomllib +else: + import tomli as tomllib + from packaging.specifiers import SpecifierSet from packaging.version import Version