mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 16:48:30 +00:00
Fix: Add conditional import for Self type to support Python 3.10
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
14
tests/compatibility/test_python310_compatibility.py
Normal file
14
tests/compatibility/test_python310_compatibility.py
Normal file
@@ -0,0 +1,14 @@
|
||||
def test_self_import_compatibility():
|
||||
"""
|
||||
Test that the Self type is properly imported and used
|
||||
in a way that supports Python 3.10+.
|
||||
|
||||
This test will pass as long as the module imports successfully.
|
||||
The actual failure would happen during import if the compatibility
|
||||
fix is not working.
|
||||
"""
|
||||
try:
|
||||
from crewai.memory.memory import Self
|
||||
assert True, "Self type imported successfully"
|
||||
except ImportError:
|
||||
assert False, "Failed to import Self type from crewai.memory.memory"
|
||||
Reference in New Issue
Block a user