Filter deprecation warning from docker.
@@ -22,6 +22,7 @@ import os
import pickle
import re
import subprocess
+import warnings
from functools import lru_cache
from pathlib import Path
from typing import Dict, List, NamedTuple, Optional, Union
@@ -222,6 +223,9 @@ class GccParamIntOption(Option):
@lru_cache(maxsize=2)
def get_docker_client():
"""Fetch the docker client singleton."""
+ # Ignore deprecation warnings from docker.from_env().
+ with warnings.catch_warnings():
+ warnings.filterwarnings("ignore", category=DeprecationWarning)
try:
return docker.from_env()
except docker.errors.DockerException as e:
