[project] name = "cfc-langgraph" version = "0.1.0" description = "cfc AI sidecar service with LangGraph" requires-python = ">=3.11" dependencies = [ "fastapi>=0.115", "uvicorn[standard]>=0.34", "pydantic>=2.10", "pydantic-settings>=2.7", "httpx>=0.28", "langchain>=0.3,<1.0", "langchain-community>=0.3,<1.0", "langchain-openai>=0.3,<1.0", "langgraph>=0.3,<1.0", "chromadb==0.5.23", "langchain-chroma==0.1.4", "python-multipart>=0.0.20", "prometheus-client>=0.21", "faster-whisper==1.2.1", "av==18.1.0", ] [project.optional-dependencies] dev = [ "pytest>=8", "pytest-asyncio>=0.25", "ruff>=0.8", "httpx", ] [tool.ruff] target-version = "py311" line-length = 100 select = ["E", "F", "I", "N", "W"] ignore = ["E501"] [tool.pytest.ini_options] # pytest-asyncio 1.x 要求显式 loop scope;B-74 修复(2026-11-09): # session 级 autouse async fixture(conftest._init_checkpointer_global)需 # session/auto 默认 loop scope 方能初始化 checkpointer 并无缝复用于全部测试。 asyncio_mode = "auto" asyncio_default_fixture_loop_scope = "session" # B-117 修复:仅设 fixture loop scope 不够;测试函数本身默认 function scope, # 与 session-scoped checkpointer 跨 loop,触发 "Lock bound to different event loop"。 # 将测试 loop 也提升到 session,让所有 async 测试共享同一事件循环,避免 AsyncSqliteSaver # 内部 Condition/Lock 绑定失效。 asyncio_default_test_loop_scope = "session"