-
Notifications
You must be signed in to change notification settings - Fork 89
Rename generic agent hinter to hint_use_agent #311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: generic_agent_hinter
Are you sure you want to change the base?
Rename generic agent hinter to hint_use_agent #311
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Deprecation notice not logged ▹ view | ||
| Encapsulate Module Deprecation Logic ▹ view |
Files scanned
| File Path | Reviewed |
|---|---|
| src/agentlab/agents/generic_agent_hinter/init.py | ✅ |
| src/agentlab/agents/hint_use_agent/init.py | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
| warnings.warn( | ||
| f"{OLD} is renamed to {NEW}. {OLD} will be removed in future", | ||
| DeprecationWarning, | ||
| stacklevel=2, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deprecation notice not logged 
Tell me more
What is the issue?
The code uses a warning to log the deprecation notice, which may not be captured in standard logging systems.
Why this matters
Warnings might be suppressed or not visible in production environments, potentially leading to missed deprecation notices.
Suggested change ∙ Feature Preview
Add a logging statement in addition to the warning:
import logging
logging.warning(f"{OLD} is renamed to {NEW}. {OLD} will be removed in future")
warnings.warn(
f"{OLD} is renamed to {NEW}. {OLD} will be removed in future",
DeprecationWarning,
stacklevel=2,
)Provide feedback to improve future suggestions
💬 Looking for more details? Reply to this comment to chat with Korbit.
| # Alias the top-level | ||
| new_mod = importlib.import_module(NEW) | ||
| sys.modules[OLD] = new_mod | ||
|
|
||
| # Alias known submodules | ||
| for sub in SUBS: | ||
| sys.modules[f"{OLD}.{sub}"] = importlib.import_module(f"{NEW}.{sub}") |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This pull request renamed the agentlab.agents.generic_agent_hinter
module to a new module namedagentlab.agents.hint_use_agent`, and sets up a deprecation warning and import redirection for backward compatibility. The main logic and exports now reside in the new module, while the old module serves as a compatibility layer that warns users and forwards imports.Module rename and automatic forwarding imports:
agentlab.agents.generic_agent_hinterto the newagentlab.agents.hint_use_agentmodule.agentlab.agents.generic_agent_hinterto inform users of the module rename and future removal.agentlab.agents.generic_agent_hinterto dynamically import and alias the new module and its submodules, ensuring existing code that imports from the old module continues to work.Description by Korbit AI
What change is being made?
Rename the generic_agent_hinter package to hint_use_agent and make the old path forward-compatible by deprecating the old import path and aliasing it to the new one, while wiring up submodule imports accordingly.
Why are these changes being made?
Align the package naming with the new hint_use_agent convention and preserve backward compatibility so existing imports continue to work while guiding users toward the new path. No functional changes to agent behavior; this is a clean rename with a deprecation notice.