mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-01 23:32:39 +00:00
fix: use tomli for Python 3.10 compatibility in tests
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 <joao@crewai.com>
This commit is contained in:
@@ -1,8 +1,13 @@
|
|||||||
"""Test that dependency constraints are compatible with common integrations."""
|
"""Test that dependency constraints are compatible with common integrations."""
|
||||||
|
|
||||||
import tomllib
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
if sys.version_info >= (3, 11):
|
||||||
|
import tomllib
|
||||||
|
else:
|
||||||
|
import tomli as tomllib
|
||||||
|
|
||||||
from packaging.specifiers import SpecifierSet
|
from packaging.specifiers import SpecifierSet
|
||||||
from packaging.version import Version
|
from packaging.version import Version
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user