← 输入框|github.com|刷新
Skip to content

gh-126931: Clarify arguments to os.spawn functions - #162835

Open
dhairyajangir wants to merge 1 commit into
python:mainfrom
dhairyajangir:docs/gh-126931-spawn-argv0
Open

dhairyajangir wants to merge 1 commit into
python:mainfrom
dhairyajangir:docs/gh-126931-spawn-argv0

Conversation

@dhairyajangir

Copy link
Copy Markdown

Fixes gh-126931.

The os.spawnl* signatures now show the required first command-line argument. The shared documentation explains how both the l and v forms pass argv[0], and shows how to run a program without supplying any further arguments.

Verified on Windows that spawnl and spawnv reject missing or empty argv[0] and can run a child with only argv[0]. The full Sphinx lint check passed.

I used Codex to trace the implementation, draft the documentation change, and run local checks. I reviewed the patch before submission.

@python-cla-bot

python-cla-bot Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-29T12:44:51.602490Z a3947a4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #36242460 | 📁 Comparing a3947a4 against main (31ed3ef)

  🔍 Preview build  

1 file changed
± library/os.html

Comment thread Doc/library/os.rst
parameters is variable, with the arguments being passed in a list or tuple as
the *args* parameter. In either case, the arguments to the child process must
start with the name of the command being run.
The "l" variants take each command-line argument as a separate positional

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this changed?

@bedevere-app

bedevere-app Bot commented Nov 29, 2026

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@picnixz picnixz added the AI-needs-explanation AI-assisted work that needs further explanation and follow up from the contributor label Nov 29, 2026
@bedevere-app

bedevere-app Bot commented Nov 29, 2026

Copy link
Copy Markdown

Thank you for your interest in contributing to Python. This is a community-driven project, and we want it to be a welcoming place to learn and collaborate.

Contributors are responsible for reviewing and understanding what they submit, checking its claims, and being able to explain changes in their own words. This helps reviewers focus on the contribution and leaves more time to support other contributors.

This contribution appears to have been authored with AI assistance. Please explain your contribution in your own words and describe how you checked its correctness.

Please read our guidelines for using AI tools.

@picnixz

picnixz commented Nov 29, 2026

Copy link
Copy Markdown
Member

I don't think the AI draft has been reviewed carefully enough, otherwise unrelated changes would not have been made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-needs-explanation AI-assisted work that needs further explanation and follow up from the contributor awaiting changes docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Cannot os.spawnl with no arguments

2 participants