Cannot `os.spawnl` with no arguments
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 77.2k
- Forks
- 35.9k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie mit der in der Traceback-Ausgabe gezeigten Implementierung von os.spawnl und der entsprechenden Dokumentation für spawnl und spawnv. Reproduzieren Sie die Windows-Fälle ohne Argument und mit einem leeren ersten Argument. Bestimmen Sie anschließend das beabsichtigte Verhalten und aktualisieren Sie die Implementierung oder die Dokumentation, sodass die Anforderungen an die akzeptierten Argumente eindeutig sind und durch Tests abgedeckt werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- operating-systems
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 30/100