Merge pull request !2815 from rhodecode-enterprise-ce fix/suppress-deprecation-warning

fix: suppress deprecation error for SSH as well
This commit is contained in:
Andrii Verbytskyi 2025-09-19 11:14:57 +00:00
commit d953c235c7
2 changed files with 8 additions and 0 deletions

View file

@ -25,6 +25,7 @@ import click
from rhodecode.lib.pyramid_utils import bootstrap
from rhodecode.lib.statsd_client import StatsdClient
from rhodecode.config.patches import suppress_pkg_resources_warnings
from .backends import SshWrapper
from .utils import setup_custom_logging
@ -47,6 +48,9 @@ log = logging.getLogger(__name__)
@click.option("--shell", "-s", is_flag=True, help="Allow Shell")
@click.option("--debug", is_flag=True, help="Enabled detailed output logging")
def main(ini_path, mode, user, user_id, key_id, shell, debug):
# Apply pkg_resources deprecation warning suppression early
suppress_pkg_resources_warnings()
setup_custom_logging(ini_path, debug)
command = os.environ.get("SSH_ORIGINAL_COMMAND", "")

View file

@ -32,6 +32,7 @@ import logging
import click
from rhodecode.config.config_maker import sanitize_settings_and_apply_defaults
from rhodecode.config.patches import suppress_pkg_resources_warnings
from rhodecode.lib.request import Request
from rhodecode.lib.utils2 import AttributeDict
from rhodecode.lib.statsd_client import StatsdClient
@ -59,6 +60,9 @@ log = logging.getLogger(__name__)
@click.option("--shell", "-s", is_flag=True, help="Allow Shell")
@click.option("--debug", is_flag=True, help="Enabled detailed output logging")
def main(ini_path, mode, user, user_id, key_id, shell, debug):
# Apply pkg_resources deprecation warning suppression early
suppress_pkg_resources_warnings()
time_start = time.time()
setup_custom_logging(ini_path, debug)