community: Use Blockbuster to detect blocking calls in asyncio during tests (#29609)

Same as https://github.com/langchain-ai/langchain/pull/29043 for
langchain-community.

**Dependencies:**
- blockbuster (test)

**Twitter handle:** cbornet_

Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
Christophe Bornet
2025-02-08 02:10:39 +01:00
committed by GitHub
parent 3a57a28daa
commit 30f6c9f5c8
8 changed files with 104 additions and 26 deletions

View File

@@ -1,10 +1,12 @@
from __future__ import annotations
import functools
from importlib.metadata import version
from packaging.version import parse
@functools.cache
def is_openai_v1() -> bool:
"""Return whether OpenAI API is v1 or more."""
_version = parse(version("openai"))