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
- gh-143698: correctly check
schedulerandsetpgroupvalues foros.posix_spawn[p]#143699 - [3.14] gh-143698: correctly check
schedulerandsetpgroupvalues foros.posix_spawn[p](GH-143699) #145073 - [3.13] gh-143698: correctly check
schedulerandsetpgroupvalues foros.posix_spawn[p](GH-143699) #145074