Files
langchain/libs/core/langchain_core/callbacks
Mason Daugherty 3b48f48458 fix(core): use asyncio.get_running_loop() in async contexts (#38157)
Closes #35726

---

Several async functions called `asyncio.get_event_loop()`, which has
been deprecated since Python 3.10. Inside `async def` bodies the loop is
always running, so `asyncio.get_running_loop()` is the correct,
warning-free replacement with no behavior change.

This updates the call in `_ahandle_event_for_handler` (core callbacks),
`_render_mermaid_using_pyppeteer` (core runnables graph), and
`async_api_key_wrapper` (`langchain-openai` client utils). Users running
on modern Python no longer see `DeprecationWarning`s from these paths.

Made by [Open SWE](https://openswe.vercel.app)

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-06-22 22:26:16 -04:00
..
2026-01-23 23:07:48 -05:00
2026-01-23 23:07:48 -05:00
2026-01-23 23:07:48 -05:00