mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-01 23:32:39 +00:00
Fix #2771: Add backward compatibility for misspelled telemetry import
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
10
src/crewai/telemtry.py
Normal file
10
src/crewai/telemtry.py
Normal 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"]
|
||||||
10
tests/backward_compatibility_test.py
Normal file
10
tests/backward_compatibility_test.py
Normal 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)
|
||||||
Reference in New Issue
Block a user