pipes from subprocess_exec do not have extra info 'pipe' (incompatible with vanilla asyncio)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- backend, networking
Direzione di ricerca
Inizia nel codice di UVProcessTransport, nel punto in cui viene creato il WriteUnixTransport per le pipe dei sottoprocessi, e confrontalo con loop.create_write_pipe(), che aggiunge le informazioni extra della pipe. Verifica che il transport stdin del sottoprocesso restituito da get_pipe_transport() esponga la pipe sottostante tramite get_extra_info('pipe'), in linea con il comportamento di vanilla asyncio.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
-
uvloop version:
0.19.0 -
Python version:
3.10.12 -
Platform:
linux -
Can you reproduce the bug with
PYTHONASYNCIODEBUGin env?:
yes -
Does uvloop behave differently from vanilla asyncio? How?:
Yes, this is the point of this issue report. So after you get your process transport from subprocess_exec(...) you then can use get_pipe_transport() to access the transport associated with stdin. With vanilla asyncio you can then call get_extra_info('pipe') on that transport to access the pipe directly. With uvloop get_extra_info('pipe') on the same transport returns None.
I can see in the source that when a pipe transport is created via loop.create_write_pipe(...) we have:
transp = WriteUnixTransport.new(self, proto, None, waiter)
transp._add_extra_info('pipe', pipe)
However no transp._add_extra_info(...) is done on the WriteUnixTransport that is created inside the UVProcessTransport code. There are ways to work around this (don't depend on getting access to that pipe) however this works fine in the asyncio loop implementation. I imagine it can be done without too much pain by wrapping the raw file descriptor created in the process transport code however I'm not super fluent in cython so I didn't attempt a patch.
- Lingua principale
- Cython
- Stelle
- 11.9k
- Fork
- 615
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di MagicStack/uvloop
-
License not clear Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
MagicStack/uvloop#759 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
MagicStack/uvloop#741 · 2 reazioni ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
MagicStack/uvloop#702 · 8 commenti · 9 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
MagicStack/uvloop#766 ·
-
Directly constructed subprocess pipe protocols segfault when callbacks use a non-process owner Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
MagicStack/uvloop#765 ·
Tutte le issue di MagicStack/uvloop
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
canonical/paas-charm#368 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
tech debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
area:workflow bug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
fil-donadoni/tolaria#4409 ·
-
status/awaiting_triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100