diff --git a/amber/pyproject.toml b/amber/pyproject.toml index dd9f2f939e4..bfa83112bc0 100644 --- a/amber/pyproject.toml +++ b/amber/pyproject.toml @@ -42,4 +42,9 @@ testpaths = ["src/test/python"] addopts = "--import-mode=importlib" markers = [ "integration: end-to-end test routed to the amber-integration CI job", -] \ No newline at end of file +] +# `fs` pulls in pkg_resources at import time (#4199); the same filter lives in +# texera_run_python_worker.py for spawned workers. +filterwarnings = [ + "ignore:pkg_resources is deprecated as an API.*:UserWarning", +] diff --git a/amber/src/main/python/texera_run_python_worker.py b/amber/src/main/python/texera_run_python_worker.py index 1e131d45739..d6b447db483 100644 --- a/amber/src/main/python/texera_run_python_worker.py +++ b/amber/src/main/python/texera_run_python_worker.py @@ -18,8 +18,19 @@ import base64 import json import sys +import warnings from loguru import logger +# `fs` (imported transitively by the core import below) pulls in pkg_resources +# at import time (#4199), which emits this deprecation warning on stderr in +# every spawned worker. It is not actionable on our side, so filter it before +# the import chain runs. Mirrored for pytest in amber/pyproject.toml. +warnings.filterwarnings( + "ignore", + message="pkg_resources is deprecated as an API.*", + category=UserWarning, +) + try: from core.python_worker import PythonWorker from core.storage.storage_config import StorageConfig