1. Tarek Ziadé
  2. distribute
  3. Issues
Issue #45 wontfix

don't chat on stdout

Zooko O'Whielacronx
created an issue

setuptools has a habit of writing progress messages to stdout. This is not the Unix way, where diagnostic messages about your progress ought to go to stderr, and preferably only if someone specifically asked you to be chatty by passing "--verbose".

The pyflakes plugin for buildbot invokes pyflakes to report on any potential problems in the source code. If anything appears on stdout, the pyflakes plugin for buildbot thinks that means that pyflakes is reporting a warning.

Put these two facts together, and this means that my "setuptools_pyflakes" plugin cannot be transparently used to connect the buildbot to the Python project which is being built, because when my plugin gets auto-installed by setuptools, setuptools writes things like this on stdout:

Installed c:\documents and settings\buildslave\windows-pycryptopp\windows-native\build\setuptools_pyflakes-1.0.5-py2.5.egg running flakes

Which makes the build turn orange (WARNING) for that builder. Here's an example:


The work-around for me is to persuade each of the dozen or so buildbot operators to manually install setuptools_pyflakes. In that case, no extraneous messages appear on stdout, and a code base (with no pyflakes warnings in it) gets a green light:


So, to fix this ticket, either make it so that all the Distribute progress messages go to stderr instead of stdout and/or make it so that Distribute doesn't emit any progress messages unless there is an explicit verboseness request such as "--verbose".

If this sort of change sounds amenable to the Distribute maintainers, I might find time to write a patch.

Comments (7)

  1. Tarek Ziadé repo owner

    Notice that the preffered way would be to use the logging module everywhere with a dedicated logger instance for distribute, and make it send the messages to stdout if verbose is activated, using the setLevel method.

  2. Log in to comment