From 156172cfe274a8bb21aea62ec80b47cf1443153d Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2026 14:04:31 +0000 Subject: [PATCH] fix: use tomli fallback for Python 3.10 compatibility in tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: João --- lib/cli/tests/test_entrypoint_consistency.py | 7 ++++++- lib/crewai/tests/cli/test_entrypoint.py | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/cli/tests/test_entrypoint_consistency.py b/lib/cli/tests/test_entrypoint_consistency.py index 081fcca34..ad143be69 100644 --- a/lib/cli/tests/test_entrypoint_consistency.py +++ b/lib/cli/tests/test_entrypoint_consistency.py @@ -8,10 +8,15 @@ via `uv tool install` exposes the `crewai` executable. from __future__ import annotations +import sys from pathlib import Path import pytest -import tomllib + +if sys.version_info >= (3, 11): + import tomllib +else: + import tomli as tomllib LIB_DIR = Path(__file__).resolve().parents[2] diff --git a/lib/crewai/tests/cli/test_entrypoint.py b/lib/crewai/tests/cli/test_entrypoint.py index 1575a68b5..52ae0f141 100644 --- a/lib/crewai/tests/cli/test_entrypoint.py +++ b/lib/crewai/tests/cli/test_entrypoint.py @@ -8,11 +8,16 @@ any [project.scripts], so uv could not find an executable to expose. from __future__ import annotations import importlib +import sys from pathlib import Path import click import pytest -import tomllib + +if sys.version_info >= (3, 11): + import tomllib +else: + import tomli as tomllib CREWAI_PYPROJECT = (