Skip to content

SystemError when passing invalid argument to posix_spawn #143698

Closed

Description

@donbarbos

Bug report

Bug description:

Seems os.posix_spawn uses new-style argument parsing with kwtuple in a vectorcall function, which can trigger a SystemError instead of a TypeError for invalid keyword-only argument.

Tested on Ubuntu 22.04:

>>> import os
>>> os.posix_spawn("/bin/echo", ["echo", "hi"], os.environ, scheduler=None)
Traceback (most recent call last):
  File "<python-input-1>", line 1, in <module>
    os.posix_spawn("/bin/echo", ["echo", "hi"], os.environ, scheduler=None)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: new style getargs format but argument is not a tuple

CPython versions tested on:

CPython main branch, 3.9

Operating systems tested on:

Linux

Linked PRs

Activity

  1. self-assigned this
    on Jan 11, 2026
  2. added 2 commits that reference this issue on Jan 11, 2026
  3. picnixz commented on Jan 11, 2026

    @picnixz
    Member

    Thanks for the report and sorry if you have actually planned to write a PR!

  4. fury0928 commented on Jan 13, 2026

    @fury0928

    HI @picnixz nice to meet you
    I'd like to contribute on this issue
    May I take up this if still open?
    Thank you

  5. picnixz commented on Jan 13, 2026

    @picnixz
    Member

    Not really, I am already working on it.

  6. fury0928 commented on Jan 13, 2026

    @fury0928

    Not really, I am already working on it.

    Do you have any issue that might be good fit for contribution?
    If so, please assign me

  7. added 5 commits that reference this issue on Feb 21, 2026
  8. added a commit that references this issue on Feb 28, 2026
  9. added a commit that references this issue on Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

extension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions