mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-01 13:18:10 +00:00
Fix tomllib import for Python 3.10 compatibility
Use tomli (already a core dep) as fallback on Python <3.11 where tomllib is not available. Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -6,9 +6,13 @@ conflict with crewAI's own requirements (openai, python-dotenv, etc.).
|
||||
"""
|
||||
|
||||
import sys
|
||||
import tomllib
|
||||
from pathlib import Path
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
import tomllib
|
||||
else:
|
||||
import tomli as tomllib
|
||||
|
||||
import pytest
|
||||
from packaging.specifiers import SpecifierSet
|
||||
from packaging.version import Version
|
||||
|
||||
Reference in New Issue
Block a user