mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-10 20:05:14 +03:00
Fixed a resource leak in the `astream_events` and `astream_log` streaming tracers: when constructed from synchronous code on Python 3.14+, an internally created event loop was never closed, causing a `ResourceWarning: unclosed event loop` to be emitted at garbage-collection time (and intermittent failures of warning-sensitive tests such as `test_chat_prompt_template_variable_names`). The loop is now closed when the handler is garbage collected.