python / python/cpython

Cannot `os.spawnl` with no arguments

オープン
#126,931 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

docs type-bug
主要言語
Python
スター
77.2k
フォーク
35.9k
PR マージ指標
PR 指標を取得中

説明

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
  1. 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
  1. 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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

traceback に示されている os.spawnl の実装と、spawnl および spawnv の対応するドキュメントから始めます。引数なしの場合と、最初の引数が空の場合の Windows のケースを再現し、その後、意図された動作を特定して、受け付ける引数の要件が明確になり、テストでカバーされるように実装またはドキュメントを更新します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
operating-systems
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。