From 81595fff1416355f9b47f04c2c411d6c0e77791a Mon Sep 17 00:00:00 2001 From: Lucas Gomide Date: Tue, 10 Jun 2025 14:17:04 -0300 Subject: [PATCH] fix: resolve Self import on python 3.10 --- src/crewai/lite_agent.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/crewai/lite_agent.py b/src/crewai/lite_agent.py index b4916043c..f90492427 100644 --- a/src/crewai/lite_agent.py +++ b/src/crewai/lite_agent.py @@ -1,7 +1,12 @@ import asyncio import inspect import uuid -from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union, cast, get_args, get_origin, Self +from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union, cast, get_args, get_origin + +try: + from typing import Self +except ImportError: + from typing_extensions import Self from pydantic import BaseModel, Field, InstanceOf, PrivateAttr, model_validator, field_validator