mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-06 01:32:36 +00:00
test: use tomli fallback for Python 3.10
tomllib is only in the stdlib from 3.11 onward. Fall back to the tomli shim (already a transitive dep) so the regression test can import on the 3.10 leg of the test matrix.
This commit is contained in:
@@ -8,9 +8,15 @@ to defend against so future maintainers understand why a bound is required.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import tomllib
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
import tomllib
|
||||
else:
|
||||
import tomli as tomllib
|
||||
|
||||
import pytest
|
||||
from packaging.requirements import Requirement
|
||||
from packaging.specifiers import SpecifierSet
|
||||
|
||||
Reference in New Issue
Block a user