fix: correct coroutine_wrapper target in wrap_AsyncBackgroundExecutor_submit (closes #1739)#1742
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1742 +/- ##
==========================================
- Coverage 82.07% 82.04% -0.03%
==========================================
Files 215 215
Lines 26309 26309
Branches 4150 4150
==========================================
- Hits 21592 21585 -7
- Misses 3304 3310 +6
- Partials 1413 1414 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Good catch, that was definitely a typo. Thanks for the quick fix. We'll try to get this released early next week with some other things. |
|
|
|
@botbikamordehai2-sketch Can you sign the CLA so we can merge this? |
What
In
wrap_AsyncBackgroundExecutor_submit,coroutine_wrapperwas incorrectly called withwrapped(theAsyncBackgroundExecutor.submitmethod itself) instead offunc(the coroutine function being submitted). This caused the wrong object to be wrapped and passed as the callable to submit, breaking LangGraph'sweakref.WeakMethodusage in the runner.Fix
Change
func = coroutine_wrapper(wrapped, context)tofunc = coroutine_wrapper(func, context)so the submitted coroutine function is wrapped with the transaction context, not the submit method itself.Closes #1739