From 7458c73c7d3e3c199f718f1918c267268d743df3 Mon Sep 17 00:00:00 2001 From: Evgeniy Alekseev Date: Thu, 4 May 2023 14:30:27 +0300 Subject: [PATCH] disable debugpanel for now --- src/ahriman/web/web.py | 16 +++++++++------- tests/ahriman/web/test_web.py | 1 + 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/ahriman/web/web.py b/src/ahriman/web/web.py index f9b8884a..040343dd 100644 --- a/src/ahriman/web/web.py +++ b/src/ahriman/web/web.py @@ -160,13 +160,15 @@ def setup_service(architecture: str, configuration: Configuration, spawner: Spaw application.logger.info("setup process spawner") application["spawn"] = spawner - application.logger.info("setup debug panel") - debug_enabled = configuration.getboolean("web", "debug", fallback=False) - if debug_enabled: - import aiohttp_debugtoolbar # type: ignore[import] - aiohttp_debugtoolbar.setup(application, - hosts=configuration.getlist("web", "debug_allowed_hosts", fallback=[]), - check_host=configuration.getboolean("web", "debug_check_host", fallback=False)) + # disable debug panel as it is not compatible with python 3.11 at the moment + # https://github.com/aio-libs/aiohttp-debugtoolbar/issues/477 + # application.logger.info("setup debug panel") + # debug_enabled = configuration.getboolean("web", "debug", fallback=False) + # if debug_enabled: + # import aiohttp_debugtoolbar # type: ignore[import] + # aiohttp_debugtoolbar.setup(application, + # hosts=configuration.getlist("web", "debug_allowed_hosts", fallback=[]), + # check_host=configuration.getboolean("web", "debug_check_host", fallback=False)) application.logger.info("setup authorization") validator = application["validator"] = Auth.load(configuration, database) diff --git a/tests/ahriman/web/test_web.py b/tests/ahriman/web/test_web.py index 7a46e9f9..855ed27c 100644 --- a/tests/ahriman/web/test_web.py +++ b/tests/ahriman/web/test_web.py @@ -120,6 +120,7 @@ def test_run_with_auth(application_with_auth: Application, mocker: MockerFixture ) +@pytest.mark.skip(reason="https://github.com/aio-libs/aiohttp-debugtoolbar/issues/477") def test_run_with_debug(application_with_debug: Application, mocker: MockerFixture) -> None: """ must run application with enabled debug panel