refactor: streamline tracing condition checks and clean up deprecated warnings (#3358)

This commit simplifies the conditions for enabling tracing in both the Crew and Flow classes by removing the redundant call to `on_first_execution_tracing_confirmation()`. Additionally, it removes deprecated warning filters related to Pydantic in the KnowledgeStorage and RAGStorage classes, improving code clarity and maintainability.
This commit is contained in:
Lorenze Jay
2025-08-18 19:56:00 -07:00
committed by GitHub
parent 6068fe941f
commit d743e12a06
4 changed files with 13 additions and 20 deletions

View File

@@ -13,7 +13,6 @@ from crewai.utilities.chromadb import create_persistent_client
from crewai.utilities.constants import MAX_FILE_NAME_LENGTH
from crewai.utilities.paths import db_storage_path
import warnings
from pydantic.warnings import PydanticDeprecatedSince211
@contextlib.contextmanager
@@ -68,7 +67,6 @@ class RAGStorage(BaseRAGStorage):
# TODO: Remove this once we upgrade chromadb to at least 1.0.8.
warnings.filterwarnings(
"ignore",
category=PydanticDeprecatedSince211,
message=r".*'model_fields'.*is deprecated.*",
module=r"^chromadb(\.|$)",
)