0.17 tweaks (#18892)

* Set version

* Cleanup more logs

* Don't log matplotlib
This commit is contained in:
Nicolas Mowen
2025-08-16 10:20:33 -05:00
committed by Blake Blackshear
parent cf62bee170
commit ceeb6543f5
3 changed files with 6 additions and 3 deletions
+3 -2
View File
@@ -80,6 +80,7 @@ def apply_log_levels(default: str, log_levels: dict[str, LogLevel]) -> None:
log_levels = {
"absl": LogLevel.error,
"httpx": LogLevel.error,
"matplotlib": LogLevel.error,
"tensorflow": LogLevel.error,
"werkzeug": LogLevel.error,
"ws4py": LogLevel.error,
@@ -193,7 +194,7 @@ class LogRedirect(io.StringIO):
@contextmanager
def redirect_fd_to_queue(queue: Queue[str]) -> Generator[None, None, None]:
def __redirect_fd_to_queue(queue: Queue[str]) -> Generator[None, None, None]:
"""Redirect file descriptor 1 (stdout) to a pipe and capture output in a queue."""
stdout_fd = os.dup(1)
read_fd, write_fd = os.pipe()
@@ -249,7 +250,7 @@ def redirect_output_to_logger(logger: logging.Logger, level: int) -> Any:
try:
# Redirect C-level stdout
with redirect_fd_to_queue(queue):
with __redirect_fd_to_queue(queue):
result = func(*args, **kwargs)
finally:
# Restore Python stdout/stderr