Custom `loop_factory` for `asyncio`
- Lingua principale
- Python
- Stelle
- 734
- Fork
- 412
- Merge medio
- 1g 5h
- PR unite (30g)
- 8
Descrizione
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!
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 30/100