HomePhabricator

check-py3-compat: manually format and print warnings

Authored by indygreg.

Description

check-py3-compat: manually format and print warnings

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.

Differential Revision: https://phab.mercurial-scm.org/D5845

Details

Committed
indygregFeb 4 2019, 5:38 PM
Differential Revision
D5845: check-py3-compat: manually format and print warnings
Parents
rHG01417ca7f2e2: check-py3-compat: provide filename to ast.parse()
Branches
Unknown
Tags
Unknown