fix: use tomli fallback for Python 3.10 compatibility in tests

Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
Devin AI
2026-06-02 14:04:31 +00:00
parent 7419fa8a7d
commit 156172cfe2
2 changed files with 12 additions and 2 deletions

View File

@@ -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]

View File

@@ -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 = (