ref(langchain): Greatly simplify _wrap_configure#4479
Merged
szokeasaurusrex merged 1 commit intomasterfrom Jun 24, 2025
Merged
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #4479 +/- ##
==========================================
- Coverage 80.64% 80.63% -0.01%
==========================================
Files 142 142
Lines 16033 16037 +4
Branches 2747 2741 -6
==========================================
+ Hits 12930 12932 +2
- Misses 2236 2239 +3
+ Partials 867 866 -1
|
f2bd2a6 to
9880666
Compare
e4dadc3 to
8adbbe7
Compare
Resolving #4443 requires some changes to this method, but the current `args`/`kwargs` business makes the method difficult to reason through. This PR simplifies the logic by listing out the parameters we need to access, so we don't need to access them through `args` and `kwargs`. We also cut down on the amount of branching and the amount of variables (`new_callbacks` vs `existing_callbacks`). Behavior does not change in this PR; we will introduce behavior changes in a subsequent PR
8adbbe7 to
901b579
Compare
szokeasaurusrex
added a commit
that referenced
this pull request
Jun 17, 2025
While implementing #4479, I noticed that our Langchain integration lacks support for the `local_callbacks` having type `BaseCallbackManager`, which according to the type hint is possible. This change adds support for this case.
szokeasaurusrex
added a commit
that referenced
this pull request
Jun 24, 2025
While implementing #4479, I noticed that our Langchain integration lacks support for the `local_callbacks` having type `BaseCallbackManager`, which according to the type hint is possible. This change adds support for this case.
szokeasaurusrex
added a commit
that referenced
this pull request
Jun 24, 2025
While implementing #4479, I noticed that our Langchain integration lacks support for the `local_callbacks` having type `BaseCallbackManager`, which according to the type hint is possible. This change adds support for this case.
szokeasaurusrex
added a commit
that referenced
this pull request
Jun 25, 2025
While implementing #4479, I noticed that our Langchain integration lacks support for the `local_callbacks` having type `BaseCallbackManager`, which according to the type hint is possible. This change adds support for this case.
szokeasaurusrex
added a commit
that referenced
this pull request
Jun 25, 2025
While implementing #4479, I noticed that our Langchain integration lacks support for the `local_callbacks` having type `BaseCallbackManager`, which according to the type hint is possible. This change adds support for this case.
szokeasaurusrex
added a commit
that referenced
this pull request
Jul 15, 2025
While implementing #4479, I noticed that our Langchain integration lacks support for the `local_callbacks` having type `BaseCallbackManager`, which according to the type hint is possible. This change adds support for this case.
szokeasaurusrex
added a commit
that referenced
this pull request
Jul 15, 2025
While implementing #4479, I noticed that our Langchain integration lacks support for the `local_callbacks` having type `BaseCallbackManager`, which according to the type hint is possible. This change adds support for this case. Fixes #4537 --- Thank you for contributing to `sentry-python`! Please add tests to validate your changes, and lint your code using `tox -e linters`. Running the test suite on your PR might require maintainer approval.
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.
Resolving #4443 requires some changes to this method, but the current
args/kwargsbusiness makes the method difficult to reason through.This PR simplifies the logic by listing out the parameters we need to access, so we don't need to access them through
argsandkwargs.We also cut down on the amount of branching and the amount of variables (
new_callbacksvsexisting_callbacks).Behavior does not change in this PR; we fix the #4443 bug in #4485, which is based on this PR
Thank you for contributing to
sentry-python! Please add tests to validate your changes, and lint your code usingtox -e linters.Running the test suite on your PR might require maintainer approval.