mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-01 15:22:37 +00:00
Fix Python 3.10 compatibility: Replace datetime.UTC with timezone.utc
- Created datetime_compat module to provide UTC constant using timezone.utc - Updated all direct UTC imports to use compatibility module - Added tests to verify UTC timezone compatibility - Fixes #2171 Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
6
src/crewai/utilities/datetime_compat.py
Normal file
6
src/crewai/utilities/datetime_compat.py
Normal file
@@ -0,0 +1,6 @@
|
||||
"""Compatibility module for datetime functionality across Python versions."""
|
||||
from datetime import timezone
|
||||
|
||||
# Provide UTC timezone constant that works in Python 3.10+
|
||||
# This is equivalent to datetime.UTC in Python 3.11+
|
||||
UTC = timezone.utc
|
||||
Reference in New Issue
Block a user