Skip to content

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

Closed
dhairyajangir wants to merge 2 commits into
python:mainfrom
dhairyajangir:docs/gh-126931-spawn-argv0
Closed

dhairyajangir wants to merge 2 commits 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 Outdated
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?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

You are completely right. I have restored the original description explaining the 'l' and 'v' variants and kept the change minimal: only clarifying that *arg0* (or the first element of *args*) is required and cannot be empty.

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

@dhairyajangir

Copy link
Copy Markdown
Author

I have made the requested changes; please review again

@bedevere-app

bedevere-app Bot commented Nov 30, 2026

Copy link
Copy Markdown

Thanks for making the requested changes!

@picnixz: please review the changes made to this pull request.

@bedevere-app
bedevere-app Bot requested a review from picnixz November 30, 2026 14:19
@picnixz picnixz added AI-guidelines-not-met The contribution does not meet our guidelines for using AI tools and is closed automatically. and removed AI-needs-explanation AI-assisted work that needs further explanation and follow up from the contributor labels Nov 30, 2026
@bedevere-app

bedevere-app Bot commented Nov 30, 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.

We believe this contribution does not meet our guidelines for using AI tools, so we're closing it. If you think we've misunderstood your contribution, please let us know. You're welcome to explain your approach or ask questions about the guidelines.

Please read our guidelines for using AI tools.

@bedevere-app bedevere-app Bot closed this Nov 30, 2026
@picnixz

picnixz commented Nov 30, 2026

Copy link
Copy Markdown
Member

The reply to my question is an LLM reply. I don't consider this as an acceptable use of AI. Use your own words and don't let agents reply to other humans without saying so, that's disrepectful of their time.

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

Labels

AI-guidelines-not-met The contribution does not meet our guidelines for using AI tools and is closed automatically. awaiting change review 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