check-py3-compat: manually format and print warnings
ClosedPublic

Authored by indygreg on Mon, Feb 4, 5:47 PM.

Details

Summary

The warnings mechanism may print to stderr on Python 3. Independent buffering
of stdout and stderr can lead to warnings output not being printed properly.

This commit traps warnings when executing individual files and prints
warnings to stdout so output is deterministic.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
indygreg created this revision.Mon, Feb 4, 5:47 PM
This revision was automatically updated to reflect the committed changes.