Skip to content

ClickException message goes to stdout instead of stderr with version 7.1 #1495

@greschd

Description

@greschd

Thanks a lot for click - absolutely fantastic project.

I've noticed the following change when upgrading to 7.1, and am not sure if it's intentional or not:

Expected Behavior

When raising click.ClickException, the corresponding Error: <message> goes to stderr using click version 7.0.

Minimal reproducing code:

import click

@click.command()
def run():
    raise click.ClickException('exception message')

if __name__ == '__main__':
    run()
python <filename>.py 1> stdout 2> stderr

Actual Behavior

With version 7.1, the Error: exception message ends up in stdout instead of stderr.

Environment

  • Python version: Python 3.7.5
  • Click version: 7.1
  • OS: Ubuntu 18.04 [through WSL1]
  • Shell: GNU bash, version 4.4.20

Additional comments

As mentioned above I'm not sure if this is an intended change, but I couldn't find any mention on the Changelog, and this part of the docs still referes to show being printed to stderr.

Happy to do some more digging if this happens only on my system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions