Cannot `os.spawnl` with no arguments
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
Bug report
Bug description:
Python 3.8 and 3.11.9
Probably related to: https://github.com/python/cpython/issues/52284
Seems to be the same as: https://github.com/python/cpython/issues/63130
A number of bugs:
-
- Doesn't work with no arguements.
>>> os.spawnl(os.P_NOWAIT, "c:\path_to_some_program\app.exe")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<frozen os>", line 930, in spawnl
ValueError: spawnv() arg 2 cannot be empty
- If I try and make the arguement empty it also fails. This means that I am forced to send an arguement that may trigger an unknown behaviour in the spawned application.:
>>> os.spawnl(os.P_NOWAIT, "c:\path_to_some_program\app.exe", '')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<frozen os>", line 930, in spawnl
ValueError: spawnv() arg 2 first element cannot be empty
- If any aspect of this is intended, then the documentation needs to be updated to explicitly say this. Currently it implies any arguments are optional. (Honestly, the docs for this are bad generally.)
CPython versions tested on:
3.11
Operating systems tested on:
Windows
Guida per i contributori
Apri la guida per i contributori
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.
Direzione di ricerca
Inizia dall’implementazione di os.spawnl mostrata nel traceback e dalla documentazione corrispondente per spawnl e spawnv. Riproduci i casi Windows senza argomenti e con un primo argomento vuoto, quindi determina il comportamento previsto e aggiorna l’implementazione o la documentazione in modo che i requisiti per gli argomenti accettati siano espliciti e coperti dai test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- operating-systems
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 30/100