-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix(#2008): Changes GoogleSearch to GoogleSearchTools #2029
Conversation
…s deprecation warning for GoogleSearch class
class GoogleSearch(GoogleSearchTools): | ||
""" | ||
Deprecated: Use `GoogleSearchTools` instead. | ||
|
||
This class is maintained for backward compatibility and will be removed in a future version. | ||
""" | ||
|
||
def __init__( | ||
self, | ||
fixed_max_results: Optional[int] = None, | ||
fixed_language: Optional[str] = None, | ||
headers: Optional[Any] = None, | ||
proxy: Optional[str] = None, | ||
timeout: Optional[int] = 10, | ||
): | ||
warnings.warn( | ||
"GoogleSearch class is deprecated. Please use `GoogleSearchTools` instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
super().__init__( | ||
fixed_max_results=fixed_max_results, | ||
fixed_language=fixed_language, | ||
headers=headers, | ||
proxy=proxy, | ||
timeout=timeout, | ||
) |
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.
We can skip class. Were you trying to have backward compatibility?
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.
Yes i was keeping backward compatibility so that we can release it in a patch update instead of a major update
Thank you @Harsh-2909, for taking this issue up and opening a PR to resolve the issue. But this is a duplicate PR as its already tackled in #2025 |
Description
Fixes # 2008
Type of change
Please check the options that are relevant:
Checklist
./scripts/format.sh
and./scripts/validate.sh
to ensure code is formatted and linted.Additional Notes
Include any deployment notes, performance implications, security considerations, or other relevant information (e.g., screenshots or logs if applicable).