(msg)
| 1498 | |
| 1499 | |
| 1500 | def print_warning(msg): |
| 1501 | # bpo-45410: Explicitly flush stdout to keep logs in order |
| 1502 | flush_std_streams() |
| 1503 | stream = print_warning.orig_stderr |
| 1504 | for line in msg.splitlines(): |
| 1505 | print(f"Warning -- {line}", file=stream) |
| 1506 | stream.flush() |
| 1507 | |
| 1508 | # bpo-39983: Store the original sys.stderr at Python startup to be able to |
| 1509 | # log warnings even if sys.stderr is captured temporarily by a test. |
no test coverage detected
searching dependent graphs…