Commit 59b5453
Replace complex _multicall wrapper logic with streamlined completion hook pattern
The _multicall function had intricate generator-based wrapper teardown logic
that was difficult to understand and maintain. This refactoring introduces
a completion hook pattern that simplifies the wrapper invocation process.
Key changes:
- Add CompletionHook type alias with (result, exception) -> (result, exception) signature
- Implement setup_and_get_completion_hook() method in WrapperImpl class
- Unify old-style and new-style wrapper handling using run_old_style_hookwrapper adapter
- Replace complex teardown loop with simple completion hook calls
- Adjust warning stacklevel from 6 to 7 for correct source attribution
The completion hook pattern makes wrapper teardown explicit and easier to debug
while maintaining full backward compatibility with both hookwrapper and wrapper
implementations.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent cbe879e commit 59b5453
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
65 | 71 | | |
66 | 72 | | |
67 | 73 | | |
| |||
0 commit comments