Skip to content

gh-136879: Make os.spawn* arg signatures consistent with os.exec*#144458

Closed
kovan wants to merge 1 commit intopython:mainfrom
kovan:gh-136879-os-exec-spawn-args
Closed

gh-136879: Make os.spawn* arg signatures consistent with os.exec*#144458
kovan wants to merge 1 commit intopython:mainfrom
kovan:gh-136879-os-exec-spawn-args

Conversation

@kovan
Copy link
Contributor

@kovan kovan commented Feb 3, 2026

Summary

  • Updates os.spawnl, spawnle, spawnlp, and spawnlpe function signatures to show arg0, arg1, ... explicitly
  • This matches the documentation style of the os.execl family of functions

Before: spawnl(mode, path, ...)
After: spawnl(mode, path, arg0, arg1, ...)

Source verification

  • Verified in Lib/os.py that both exec* and spawn* use *args parameter

Test plan

  • make check passed

🤖 Generated with Claude Code


📚 Documentation preview 📚: https://cpython-previews--144458.org.readthedocs.build/

Update os.spawnl, spawnle, spawnlp, and spawnlpe function signatures
to show arg0, arg1, ... explicitly, matching the os.execl family of
functions for consistency.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

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

Strictly speaking, this is not the signature at runtime. At runtime, the signature is spawnl(mode, path, *args) so the ... part is correct. So I think we should first decide on the issue how we want to document the expanded args. Do we want to explicitly document spawnl(mode, path, arg0, arg1, ...), or spawnl(mode, path, arg0, ...) or simply specify that args must be non-empty with args[0] being the program name by convention? since we did not discuss yet about it, I am closing the PR otherwise it will be kept open for too long.

@bedevere-app
Copy link

bedevere-app bot commented Feb 3, 2026

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.

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

Labels

awaiting changes docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants