refactor(tools): migrate stagehand example off deprecated crewai.utilities.printer#6523
Open
AnandSundar wants to merge 1 commit into
Open
Conversation
…ities.printer The crewai.utilities.printer module is a deprecated wrapper that re-exports Printer from crewai_core.printer and emits a DeprecationWarning on every import (see lib/crewai/src/crewai/utilities/printer.py). The stagehand example was the only remaining internal caller of the deprecated wrapper. Importing it triggered the warning even though no deprecated behavior was actually being used, since the same Printer class is exposed at both paths. Migrating the import to crewai_core.printer removes the spurious DeprecationWarning without any behavioral change.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Stagehand example updates its ChangesStagehand Example
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
crewai.utilities.printermodule is a deprecated wrapper that re-exportsPrinterfromcrewai_core.printerand emits aDeprecationWarningon every import. The stagehand example script was the only remaining internal caller of the deprecated wrapper.This PR migrates the single internal import to the supported path, eliminating the spurious
DeprecationWarningwithout any behavioral change.Deprecation source
lib/crewai/src/crewai/utilities/printer.pydocstring:The same wrapper also emits a
DeprecationWarningat import time:Impact
Printeris the same class at both import paths (the deprecated wrapper re-exports it unchanged).DeprecationWarningthat fired on every import of the stagehand example script.crewai.utilities.printeris unaffected; the deprecated wrapper itself is unchanged.Files changed
lib/crewai-tools/src/crewai_tools/tools/stagehand_tool/example.py(1 line)Verification
uv run ruff checkanduv run ruff format --checkclean on the changed file.uv run mypyclean on the changed file.uv run pytest lib/crewai-tools/tests-- no new failures introduced by the change.