-
Notifications
You must be signed in to change notification settings - Fork 108
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: add default value in deprecated argument #1053
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.
Disclaimer: Experimental PR review
PR Summary
Improved parameter handling in the DatasetItemClient's link method by adding default value for deprecated parameter.
- Modified
langfuse/client.py
to set default value ofNone
for deprecatedtrace_or_observation
parameter - Reordered parameter position in link method signature to place deprecated parameter last
- Updated docstring to reflect parameter changes and deprecation status
💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
Unfortunately, this was a positional argument in the original api here and later on the keyword arguments were added. @hassiebp can you review? To me it seems like this requires a major bump as it is a breaking change. If yes, I’d suggest to add this in the next major version as this is clearly tech debt in this interface. |
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.
Thanks for your contribution!
Apologies, had to revert this PR here. As Marc has mentioned, the current interface expects positional arguments, such that moving the position of that argument would not be backwards compatible. |
How should I fix this to include it in the next major version? |
@Swalloow - we have not yet created a v3 branch for which a PR such as this one could be merged into. We have created an internal task though with this PR linked in order to make sure this will be part of our next major release. Thanks again for your contribution! |
Added a default value of None to the
trace_or_observation
for optional usage.It prevents potential confusion for users by clearly indicating the optional and deprecated parameter.
Important
Added default value
None
totrace_or_observation
parameter inlink()
function inclient.py
to indicate it is optional and deprecated.link()
function inclient.py
, added default valueNone
totrace_or_observation
parameter.trace_or_observation
is optional and deprecated.This description was created by for 391d284. It will automatically update as commits are pushed.