Fix #2771: Add backward compatibility for misspelled telemetry import

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-05-07 07:56:58 +00:00
parent cac06adc6c
commit 71cb398e88
2 changed files with 20 additions and 0 deletions

10
src/crewai/telemtry.py Normal file
View File

@@ -0,0 +1,10 @@
"""
Backward compatibility module for crewai.telemtry to handle typo in import statements.
This module allows older code that imports from `crewai.telemtry` (misspelled)
to continue working by re-exporting the Telemetry class from the correctly
spelled `crewai.telemetry` module.
"""
from crewai.telemetry import Telemetry
__all__ = ["Telemetry"]

View File

@@ -0,0 +1,10 @@
import unittest
class BackwardCompatibilityTest(unittest.TestCase):
def test_telemtry_typo_compatibility(self):
"""Test that the backward compatibility for the telemtry typo works."""
from crewai.telemtry import Telemetry as MisspelledTelemetry
from crewai.telemetry import Telemetry
self.assertIs(MisspelledTelemetry, Telemetry)