langchain/libs/core/tests
Christophe Bornet aab2e42169
core[patch]: Use Blockbuster to detect blocking calls in asyncio during tests (#29043)
This PR uses the [blockbuster](https://github.com/cbornet/blockbuster)
library in langchain-core to detect blocking calls made in the asyncio
event loop during unit tests.
Avoiding blocking calls is hard as these can be deeply buried in the
code or made in 3rd party libraries.
Blockbuster makes it easier to detect them by raising an exception when
a call is made to a known blocking function (eg: `time.sleep`).

Adding blockbuster allowed to find a blocking call in
`aconfig_with_context` (it ends up calling `get_function_nonlocals`
which loads function code).

**Dependencies:**
- blockbuster (test)

**Twitter handle:** cbornet_
2025-01-31 10:06:34 -05:00
..
integration_tests core: Add ruff rules for PIE (#26939) 2024-09-27 12:08:35 -04:00
unit_tests core[patch]: Use Blockbuster to detect blocking calls in asyncio during tests (#29043) 2025-01-31 10:06:34 -05:00
__init__.py Separate out langchain_core package (#13577) 2023-11-20 13:09:30 -08:00