Custom `loop_factory` for `asyncio`
- 主要語言
- Python
- 星號
- 734
- 分支
- 412
- 平均合併
- 1 天 5 小時
- 30 天內合併 PR
- 8
描述
Hello,
I have a use-case where we'd like to run the `ipykernel` main-loop using a specific `asyncio.AbstractEventLoop` implementation (not the stdlib's default one). Since in the `main` branch of `ipykernel` the code was migrated to use `anyio`, I believe this boils down to passing a suitable `loop_factory` value in the `backend_options` passed to `anyio.run` (unless Trio mode is enabled, of course).
Would there be any interest in a patch to allow this, essentially adding a `--IPKernelApp.asyncio_loop_factory` config option (a `DottedObjectName`)?
Thanks!
貢獻指南
研究方向
Start by tracing ipykernel's main-loop startup and the anyio.run call, focusing on how backend_options are passed and how Trio mode is selected. The requested change would expose an IPKernelApp.asyncio_loop_factory DottedObjectName and use it for asyncio mode while preserving Trio behavior; no specific files or tests are named.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- backend
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100