Skip to content

Commit 69105b7

Browse files
committed
fix(cli): suppress pkg_resources deprecation warning (#764)
The `yadageschemas` package triggers a `pkg_resources` deprecation warning on newer versions of setuptools. Suppress it at CLI startup to avoid confusing users.
1 parent dba2314 commit 69105b7

1 file changed

Lines changed: 22 additions & 8 deletions

File tree

reana_client/cli/__init__.py

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
11
# -*- coding: utf-8 -*-
22
#
33
# This file is part of REANA.
4-
# Copyright (C) 2017, 2018, 2019, 2020, 2021, 2022 CERN.
4+
# Copyright (C) 2017, 2018, 2019, 2020, 2021, 2022, 2026 CERN.
55
#
66
# REANA is free software; you can redistribute it and/or modify it
77
# under the terms of the MIT License; see LICENSE file for more details.
88
"""REANA command line interface client."""
9-
import logging
10-
import os
11-
import sys
129

13-
import click
14-
from urllib3 import disable_warnings
10+
import warnings
1511

16-
from reana_client.cli import workflow, files, ping, secrets, quotas, retention_rules
17-
from reana_client.utils import get_api_url
12+
warnings.filterwarnings(
13+
"ignore", message="pkg_resources is deprecated", module="yadageschemas"
14+
)
15+
16+
import logging # noqa: E402
17+
import os # noqa: E402
18+
import sys # noqa: E402
19+
20+
import click # noqa: E402
21+
from urllib3 import disable_warnings # noqa: E402
22+
23+
from reana_client.cli import ( # noqa: E402
24+
workflow,
25+
files,
26+
ping,
27+
secrets,
28+
quotas,
29+
retention_rules,
30+
)
31+
from reana_client.utils import get_api_url # noqa: E402
1832

1933
DEBUG_LOG_FORMAT = (
2034
"[%(asctime)s] p%(process)s "

0 commit comments

Comments
 (0)