Skip to content

subprocess.check_call should accept all POpen arguments #12084

@danyeaw

Description

@danyeaw

The following code is giving an unexpected argument error for the encoding argument:

subprocess.check_call(
        git_command + list(args),
        stderr=subprocess.DEVNULL,
        stdout=subprocess.DEVNULL,
        env=env,
        text=True,
        encoding="utf-8",
)

With error: Unexpected keyword argument "encoding" for "check_call" [call-arg].

However, the subprocess docs says that its signature is the same as the POpen constructor, which does accept encoding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions