This is an archive of the discontinued Mercurial Phabricator instance.

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

Authored by indygreg on Feb 4 2019, 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.

Event Timeline

indygreg created this revision.Feb 4 2019, 5:47 PM
This revision was automatically updated to reflect the committed changes.