From a8a8666604191412a710523852b05ce12e990a48 Mon Sep 17 00:00:00 2001 From: Leonid Vinogradov Date: Wed, 13 Nov 2024 14:57:35 +0300 Subject: [PATCH] HH-237884 don't swallow exceptions on page import --- frontik/app.py | 14 +- frontik/config_parser.py | 3 +- frontik/debug.py | 2 +- frontik/loggers/__init__.py | 8 +- frontik/routing.py | 19 +- frontik/service_discovery.py | 2 +- frontik/testing.py | 2 +- frontik/timeout_tracking.py | 4 +- frontik/util/__init__.py | 4 + poetry.lock | 228 +++++++++--------- pyproject.toml | 11 +- .../balancer_app/pages/retry_connect.py | 2 +- .../pages/retry_connect_timeout.py | 2 +- .../balancer_app/pages/retry_error.py | 2 +- .../pages/module_not_found_error_on_import.py | 1 - ..._same_as_page_not_found_error_on_import.py | 1 - tests/test_cookies.py | 2 +- tests/test_debug.py | 4 +- tests/test_default_urls.py | 2 +- tests/test_errors.py | 2 +- tests/test_frontik_testing.py | 2 +- tests/test_http_client.py | 6 +- tests/test_kafka_integration.py | 2 +- tests/test_legacy_supported.py | 2 +- tests/test_logging.py | 4 +- tests/test_logging_configurator_client.py | 7 - tests/test_no_debug_mode.py | 2 +- tests/test_request.py | 2 +- tests/test_request_context.py | 2 +- tests/test_request_id.py | 2 +- tests/test_routing.py | 2 +- tests/test_sentry_integration.py | 4 +- tests/test_statsd_integration.py | 2 +- tests/test_streaming_request.py | 2 +- tests/test_streaming_response.py | 2 +- tests/test_telemetry.py | 2 +- 36 files changed, 174 insertions(+), 186 deletions(-) delete mode 100644 tests/projects/test_app/pages/module_not_found_error_on_import.py delete mode 100644 tests/projects/test_app/pages/module_starting_same_as_page_not_found_error_on_import.py diff --git a/frontik/app.py b/frontik/app.py index ee25ec516..ff65b3f75 100644 --- a/frontik/app.py +++ b/frontik/app.py @@ -1,5 +1,5 @@ import asyncio -import importlib +import inspect import logging import multiprocessing import os @@ -35,9 +35,11 @@ ) from frontik.service_discovery import MasterServiceDiscovery, ServiceDiscovery, WorkerServiceDiscovery from frontik.tornado_connection_handler import LegacyTornadoConnectionHandler, TornadoConnectionHandler +from frontik.util import Sentinel from frontik.version import version as frontik_version app_logger = logging.getLogger('app_logger') +_DEFAULT_ARG = Sentinel() class FrontikApplication(httputil.HTTPServerConnectionDelegate): @@ -46,13 +48,12 @@ class FrontikApplication(httputil.HTTPServerConnectionDelegate): class DefaultConfig: pass - def __init__(self, app_module_name: Optional[str] = None) -> None: + def __init__(self, app_module_name: Union[None, str, Sentinel] = _DEFAULT_ARG) -> None: self.start_time = time.time() self.patch_anyio() - self.app_module_name: str = app_module_name or self.__class__.__module__ - app_module = importlib.import_module(self.app_module_name) - self.app_root = os.path.dirname(str(app_module.__file__)) + self.app_module_name: str = app_module_name if isinstance(app_module_name, str) else self.__class__.__module__ + self.app_root = os.path.dirname(inspect.getfile(self.__class__)) if options.service_name is None: options.service_name = self.app_module_name.rsplit('.', 1)[-1] self.app_name = options.service_name @@ -69,7 +70,8 @@ def __init__(self, app_module_name: Optional[str] = None) -> None: count_down_lock = multiprocessing.Lock() self.worker_state = WorkerState(init_workers_count_down, master_done, count_down_lock) # type: ignore - import_all_pages(self.app_module_name) + if app_module_name is not None: + import_all_pages(self.app_module_name) self.settings: dict = {} diff --git a/frontik/config_parser.py b/frontik/config_parser.py index f334df9fd..3f6bc0a9e 100644 --- a/frontik/config_parser.py +++ b/frontik/config_parser.py @@ -74,7 +74,8 @@ def parse_command_line(options: Options, allowed_options: Iterable) -> None: if option.type == bool: setattr(options, name, True) else: - raise Exception('Option %r requires a value' % name) + msg = f'Option {name!r} requires a value' + raise Exception(msg) if option.type == bool or get_args(option.type) == (bool, type(None)): setattr(options, name, value.lower() not in ('false', '0', 'f')) diff --git a/frontik/debug.py b/frontik/debug.py index 96c15d7e4..f611be9b1 100644 --- a/frontik/debug.py +++ b/frontik/debug.py @@ -404,7 +404,7 @@ def transform_chunk( debug_log_data = request_context.get_debug_log_handler().produce_all() # type: ignore debug_log_data.set('code', str(int(response.status_code))) - debug_log_data.set('handler-name', handler_name if handler_name else 'unknown handler') + debug_log_data.set('handler-name', handler_name or 'unknown handler') debug_log_data.set('started', _format_number(tornado_request._start_time)) debug_log_data.set('request-id', str(tornado_request.request_id)) debug_log_data.set('stages-total', _format_number((time.time() - tornado_request._start_time) * 1000)) diff --git a/frontik/loggers/__init__.py b/frontik/loggers/__init__.py index 4a3580786..d00cf9903 100644 --- a/frontik/loggers/__init__.py +++ b/frontik/loggers/__init__.py @@ -113,12 +113,12 @@ def format_stack_trace(self, record: logging.LogRecord) -> str: record.exc_text = self.formatException(record.exc_info) if record.exc_text: if stack_trace[-1:] != '\n': - stack_trace = stack_trace + '\n' - stack_trace = stack_trace + record.exc_text + stack_trace += '\n' + stack_trace += record.exc_text if record.stack_info: if stack_trace[-1:] != '\n': - stack_trace = stack_trace + '\n' - stack_trace = stack_trace + self.formatStack(record.stack_info) + stack_trace += '\n' + stack_trace += self.formatStack(record.stack_info) return stack_trace diff --git a/frontik/routing.py b/frontik/routing.py index 66e35060c..f984fe28a 100644 --- a/frontik/routing.py +++ b/frontik/routing.py @@ -66,20 +66,21 @@ def _iter_submodules(path: MutableSequence[str], prefix: str = '') -> Generator: def import_all_pages(app_module: str) -> None: """Import all pages on startup""" - try: - pages_package = importlib.import_module(f'{app_module}.pages') - except ModuleNotFoundError: + _spec = importlib.util.find_spec(f'{app_module}.pages') + if _spec is None: routing_logger.warning('There is no pages module') return + pages_package = importlib.import_module(f'{app_module}.pages') + for _, name, __ in _iter_submodules(pages_package.__path__): full_name = pages_package.__name__ + '.' + name - try: - importlib.import_module(full_name) - except ModuleNotFoundError: + + _spec = importlib.util.find_spec(full_name) + if _spec is None: continue - except Exception as ex: - raise RuntimeError('failed on import page %s %s', full_name, ex) + + importlib.import_module(full_name) router = FastAPIRouter() @@ -101,7 +102,7 @@ def _find_fastapi_route(scope: dict) -> Optional[APIRoute]: if route_path.endswith('/'): scope['path'] = scope['path'].rstrip('/') else: - scope['path'] = scope['path'] + '/' + scope['path'] += '/' for route in _fastapi_routes: match, child_scope = route.matches(scope) diff --git a/frontik/service_discovery.py b/frontik/service_discovery.py index 076662b4b..4f2957c3b 100644 --- a/frontik/service_discovery.py +++ b/frontik/service_discovery.py @@ -44,7 +44,7 @@ def _make_service_id(options: Options, *, service_name: Optional[str], hostname: def _create_http_check(options: Options, address: Optional[str]) -> dict: check_host = options.consul_check_host if not check_host: - check_host = address if address else '127.0.0.1' + check_host = address or '127.0.0.1' http_check = Check.http( f'http://{check_host}:{options.port}/status', f'{options.consul_http_check_interval_sec}s', diff --git a/frontik/testing.py b/frontik/testing.py index d4a09e12a..414aaa245 100644 --- a/frontik/testing.py +++ b/frontik/testing.py @@ -70,7 +70,7 @@ def setup_mock_http_client(self, frontik_app, passthrow_hosts, with_tornado_mock self.mock_http_client = mock_http_client yield self.mock_http_client - @pytest.fixture() + @pytest.fixture def passthrow_hosts(self): return ['http://127.0.0.1', 'http://localhost'] diff --git a/frontik/timeout_tracking.py b/frontik/timeout_tracking.py index 8272354e5..fc9e39cca 100644 --- a/frontik/timeout_tracking.py +++ b/frontik/timeout_tracking.py @@ -2,7 +2,7 @@ import logging import time -from collections import namedtuple +from collections import UserDict, namedtuple from functools import partial from typing import TYPE_CHECKING, Optional @@ -22,7 +22,7 @@ ) -class TimeoutCounter(dict): +class TimeoutCounter(UserDict): def increment(self, k: LoggingData, already_spent_ms: float) -> None: count, max_already_spent_ms = super().__getitem__(k) super().__setitem__(k, (count + 1, max(already_spent_ms, max_already_spent_ms))) diff --git a/frontik/util/__init__.py b/frontik/util/__init__.py index b458a9c8e..26ab5e5c9 100644 --- a/frontik/util/__init__.py +++ b/frontik/util/__init__.py @@ -18,6 +18,10 @@ logger = logging.getLogger('util') +class Sentinel: + pass + + def safe_template(format_string: str, **kwargs: Any) -> str: """Safe templating using PEP-292 template strings (see https://docs.python.org/3/library/string.html#template-strings). diff --git a/poetry.lock b/poetry.lock index 2d1c9d0fb..ab708f616 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "aiohttp" @@ -487,13 +487,13 @@ files = [ [[package]] name = "googleapis-common-protos" -version = "1.65.0" +version = "1.66.0" description = "Common protobufs used in Google APIs" optional = false python-versions = ">=3.7" files = [ - {file = "googleapis_common_protos-1.65.0-py2.py3-none-any.whl", hash = "sha256:2972e6c496f435b92590fd54045060867f3fe9be2c82ab148fc8885035479a63"}, - {file = "googleapis_common_protos-1.65.0.tar.gz", hash = "sha256:334a29d07cddc3aa01dee4988f9afd9b2916ee2ff49d6b757155dc0d197852c0"}, + {file = "googleapis_common_protos-1.66.0-py2.py3-none-any.whl", hash = "sha256:d7abcd75fabb2e0ec9f74466401f6c119a0b498e27370e9be4c94cb7e382b8ed"}, + {file = "googleapis_common_protos-1.66.0.tar.gz", hash = "sha256:c3e7b33d15fdca5374cc0a7346dd92ffa847425cc4ea941d970f13680052ec8c"}, ] [package.dependencies] @@ -1207,80 +1207,80 @@ files = [ [[package]] name = "orjson" -version = "3.10.10" +version = "3.10.11" description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy" optional = false python-versions = ">=3.8" files = [ - {file = "orjson-3.10.10-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:b788a579b113acf1c57e0a68e558be71d5d09aa67f62ca1f68e01117e550a998"}, - {file = "orjson-3.10.10-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:804b18e2b88022c8905bb79bd2cbe59c0cd014b9328f43da8d3b28441995cda4"}, - {file = "orjson-3.10.10-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9972572a1d042ec9ee421b6da69f7cc823da5962237563fa548ab17f152f0b9b"}, - {file = "orjson-3.10.10-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dc6993ab1c2ae7dd0711161e303f1db69062955ac2668181bfdf2dd410e65258"}, - {file = "orjson-3.10.10-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d78e4cacced5781b01d9bc0f0cd8b70b906a0e109825cb41c1b03f9c41e4ce86"}, - {file = "orjson-3.10.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e6eb2598df518281ba0cbc30d24c5b06124ccf7e19169e883c14e0831217a0bc"}, - {file = "orjson-3.10.10-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:23776265c5215ec532de6238a52707048401a568f0fa0d938008e92a147fe2c7"}, - {file = "orjson-3.10.10-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8cc2a654c08755cef90b468ff17c102e2def0edd62898b2486767204a7f5cc9c"}, - {file = "orjson-3.10.10-cp310-none-win32.whl", hash = "sha256:081b3fc6a86d72efeb67c13d0ea7c030017bd95f9868b1e329a376edc456153b"}, - {file = "orjson-3.10.10-cp310-none-win_amd64.whl", hash = "sha256:ff38c5fb749347768a603be1fb8a31856458af839f31f064c5aa74aca5be9efe"}, - {file = "orjson-3.10.10-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:879e99486c0fbb256266c7c6a67ff84f46035e4f8749ac6317cc83dacd7f993a"}, - {file = "orjson-3.10.10-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:019481fa9ea5ff13b5d5d95e6fd5ab25ded0810c80b150c2c7b1cc8660b662a7"}, - {file = "orjson-3.10.10-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0dd57eff09894938b4c86d4b871a479260f9e156fa7f12f8cad4b39ea8028bb5"}, - {file = "orjson-3.10.10-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dbde6d70cd95ab4d11ea8ac5e738e30764e510fc54d777336eec09bb93b8576c"}, - {file = "orjson-3.10.10-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3b2625cb37b8fb42e2147404e5ff7ef08712099197a9cd38895006d7053e69d6"}, - {file = "orjson-3.10.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dbf3c20c6a7db69df58672a0d5815647ecf78c8e62a4d9bd284e8621c1fe5ccb"}, - {file = "orjson-3.10.10-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:75c38f5647e02d423807d252ce4528bf6a95bd776af999cb1fb48867ed01d1f6"}, - {file = "orjson-3.10.10-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:23458d31fa50ec18e0ec4b0b4343730928296b11111df5f547c75913714116b2"}, - {file = "orjson-3.10.10-cp311-none-win32.whl", hash = "sha256:2787cd9dedc591c989f3facd7e3e86508eafdc9536a26ec277699c0aa63c685b"}, - {file = "orjson-3.10.10-cp311-none-win_amd64.whl", hash = "sha256:6514449d2c202a75183f807bc755167713297c69f1db57a89a1ef4a0170ee269"}, - {file = "orjson-3.10.10-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:8564f48f3620861f5ef1e080ce7cd122ee89d7d6dacf25fcae675ff63b4d6e05"}, - {file = "orjson-3.10.10-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5bf161a32b479034098c5b81f2608f09167ad2fa1c06abd4e527ea6bf4837a9"}, - {file = "orjson-3.10.10-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:68b65c93617bcafa7f04b74ae8bc2cc214bd5cb45168a953256ff83015c6747d"}, - {file = "orjson-3.10.10-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e8e28406f97fc2ea0c6150f4c1b6e8261453318930b334abc419214c82314f85"}, - {file = "orjson-3.10.10-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e4d0d9fe174cc7a5bdce2e6c378bcdb4c49b2bf522a8f996aa586020e1b96cee"}, - {file = "orjson-3.10.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b3be81c42f1242cbed03cbb3973501fcaa2675a0af638f8be494eaf37143d999"}, - {file = "orjson-3.10.10-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:65f9886d3bae65be026219c0a5f32dbbe91a9e6272f56d092ab22561ad0ea33b"}, - {file = "orjson-3.10.10-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:730ed5350147db7beb23ddaf072f490329e90a1d059711d364b49fe352ec987b"}, - {file = "orjson-3.10.10-cp312-none-win32.whl", hash = "sha256:a8f4bf5f1c85bea2170800020d53a8877812892697f9c2de73d576c9307a8a5f"}, - {file = "orjson-3.10.10-cp312-none-win_amd64.whl", hash = "sha256:384cd13579a1b4cd689d218e329f459eb9ddc504fa48c5a83ef4889db7fd7a4f"}, - {file = "orjson-3.10.10-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:44bffae68c291f94ff5a9b4149fe9d1bdd4cd0ff0fb575bcea8351d48db629a1"}, - {file = "orjson-3.10.10-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e27b4c6437315df3024f0835887127dac2a0a3ff643500ec27088d2588fa5ae1"}, - {file = "orjson-3.10.10-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bca84df16d6b49325a4084fd8b2fe2229cb415e15c46c529f868c3387bb1339d"}, - {file = "orjson-3.10.10-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c14ce70e8f39bd71f9f80423801b5d10bf93d1dceffdecd04df0f64d2c69bc01"}, - {file = "orjson-3.10.10-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:24ac62336da9bda1bd93c0491eff0613003b48d3cb5d01470842e7b52a40d5b4"}, - {file = "orjson-3.10.10-cp313-none-win32.whl", hash = "sha256:eb0a42831372ec2b05acc9ee45af77bcaccbd91257345f93780a8e654efc75db"}, - {file = "orjson-3.10.10-cp313-none-win_amd64.whl", hash = "sha256:f0c4f37f8bf3f1075c6cc8dd8a9f843689a4b618628f8812d0a71e6968b95ffd"}, - {file = "orjson-3.10.10-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:829700cc18503efc0cf502d630f612884258020d98a317679cd2054af0259568"}, - {file = "orjson-3.10.10-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e0ceb5e0e8c4f010ac787d29ae6299846935044686509e2f0f06ed441c1ca949"}, - {file = "orjson-3.10.10-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0c25908eb86968613216f3db4d3003f1c45d78eb9046b71056ca327ff92bdbd4"}, - {file = "orjson-3.10.10-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:218cb0bc03340144b6328a9ff78f0932e642199ac184dd74b01ad691f42f93ff"}, - {file = "orjson-3.10.10-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e2277ec2cea3775640dc81ab5195bb5b2ada2fe0ea6eee4677474edc75ea6785"}, - {file = "orjson-3.10.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:848ea3b55ab5ccc9d7bbd420d69432628b691fba3ca8ae3148c35156cbd282aa"}, - {file = "orjson-3.10.10-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:e3e67b537ac0c835b25b5f7d40d83816abd2d3f4c0b0866ee981a045287a54f3"}, - {file = "orjson-3.10.10-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:7948cfb909353fce2135dcdbe4521a5e7e1159484e0bb024c1722f272488f2b8"}, - {file = "orjson-3.10.10-cp38-none-win32.whl", hash = "sha256:78bee66a988f1a333dc0b6257503d63553b1957889c17b2c4ed72385cd1b96ae"}, - {file = "orjson-3.10.10-cp38-none-win_amd64.whl", hash = "sha256:f1d647ca8d62afeb774340a343c7fc023efacfd3a39f70c798991063f0c681dd"}, - {file = "orjson-3.10.10-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:5a059afddbaa6dd733b5a2d76a90dbc8af790b993b1b5cb97a1176ca713b5df8"}, - {file = "orjson-3.10.10-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6f9b5c59f7e2a1a410f971c5ebc68f1995822837cd10905ee255f96074537ee6"}, - {file = "orjson-3.10.10-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d5ef198bafdef4aa9d49a4165ba53ffdc0a9e1c7b6f76178572ab33118afea25"}, - {file = "orjson-3.10.10-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aaf29ce0bb5d3320824ec3d1508652421000ba466abd63bdd52c64bcce9eb1fa"}, - {file = "orjson-3.10.10-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dddd5516bcc93e723d029c1633ae79c4417477b4f57dad9bfeeb6bc0315e654a"}, - {file = "orjson-3.10.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a12f2003695b10817f0fa8b8fca982ed7f5761dcb0d93cff4f2f9f6709903fd7"}, - {file = "orjson-3.10.10-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:672f9874a8a8fb9bb1b771331d31ba27f57702c8106cdbadad8bda5d10bc1019"}, - {file = "orjson-3.10.10-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1dcbb0ca5fafb2b378b2c74419480ab2486326974826bbf6588f4dc62137570a"}, - {file = "orjson-3.10.10-cp39-none-win32.whl", hash = "sha256:d9bbd3a4b92256875cb058c3381b782649b9a3c68a4aa9a2fff020c2f9cfc1be"}, - {file = "orjson-3.10.10-cp39-none-win_amd64.whl", hash = "sha256:766f21487a53aee8524b97ca9582d5c6541b03ab6210fbaf10142ae2f3ced2aa"}, - {file = "orjson-3.10.10.tar.gz", hash = "sha256:37949383c4df7b4337ce82ee35b6d7471e55195efa7dcb45ab8226ceadb0fe3b"}, + {file = "orjson-3.10.11-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:6dade64687f2bd7c090281652fe18f1151292d567a9302b34c2dbb92a3872f1f"}, + {file = "orjson-3.10.11-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82f07c550a6ccd2b9290849b22316a609023ed851a87ea888c0456485a7d196a"}, + {file = "orjson-3.10.11-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bd9a187742d3ead9df2e49240234d728c67c356516cf4db018833a86f20ec18c"}, + {file = "orjson-3.10.11-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:77b0fed6f209d76c1c39f032a70df2d7acf24b1812ca3e6078fd04e8972685a3"}, + {file = "orjson-3.10.11-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:63fc9d5fe1d4e8868f6aae547a7b8ba0a2e592929245fff61d633f4caccdcdd6"}, + {file = "orjson-3.10.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65cd3e3bb4fbb4eddc3c1e8dce10dc0b73e808fcb875f9fab40c81903dd9323e"}, + {file = "orjson-3.10.11-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:6f67c570602300c4befbda12d153113b8974a3340fdcf3d6de095ede86c06d92"}, + {file = "orjson-3.10.11-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:1f39728c7f7d766f1f5a769ce4d54b5aaa4c3f92d5b84817053cc9995b977acc"}, + {file = "orjson-3.10.11-cp310-none-win32.whl", hash = "sha256:1789d9db7968d805f3d94aae2c25d04014aae3a2fa65b1443117cd462c6da647"}, + {file = "orjson-3.10.11-cp310-none-win_amd64.whl", hash = "sha256:5576b1e5a53a5ba8f8df81872bb0878a112b3ebb1d392155f00f54dd86c83ff6"}, + {file = "orjson-3.10.11-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:1444f9cb7c14055d595de1036f74ecd6ce15f04a715e73f33bb6326c9cef01b6"}, + {file = "orjson-3.10.11-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cdec57fe3b4bdebcc08a946db3365630332dbe575125ff3d80a3272ebd0ddafe"}, + {file = "orjson-3.10.11-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4eed32f33a0ea6ef36ccc1d37f8d17f28a1d6e8eefae5928f76aff8f1df85e67"}, + {file = "orjson-3.10.11-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:80df27dd8697242b904f4ea54820e2d98d3f51f91e97e358fc13359721233e4b"}, + {file = "orjson-3.10.11-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:705f03cee0cb797256d54de6695ef219e5bc8c8120b6654dd460848d57a9af3d"}, + {file = "orjson-3.10.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:03246774131701de8e7059b2e382597da43144a9a7400f178b2a32feafc54bd5"}, + {file = "orjson-3.10.11-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8b5759063a6c940a69c728ea70d7c33583991c6982915a839c8da5f957e0103a"}, + {file = "orjson-3.10.11-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:677f23e32491520eebb19c99bb34675daf5410c449c13416f7f0d93e2cf5f981"}, + {file = "orjson-3.10.11-cp311-none-win32.whl", hash = "sha256:a11225d7b30468dcb099498296ffac36b4673a8398ca30fdaec1e6c20df6aa55"}, + {file = "orjson-3.10.11-cp311-none-win_amd64.whl", hash = "sha256:df8c677df2f9f385fcc85ab859704045fa88d4668bc9991a527c86e710392bec"}, + {file = "orjson-3.10.11-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:360a4e2c0943da7c21505e47cf6bd725588962ff1d739b99b14e2f7f3545ba51"}, + {file = "orjson-3.10.11-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:496e2cb45de21c369079ef2d662670a4892c81573bcc143c4205cae98282ba97"}, + {file = "orjson-3.10.11-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7dfa8db55c9792d53c5952900c6a919cfa377b4f4534c7a786484a6a4a350c19"}, + {file = "orjson-3.10.11-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:51f3382415747e0dbda9dade6f1e1a01a9d37f630d8c9049a8ed0e385b7a90c0"}, + {file = "orjson-3.10.11-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f35a1b9f50a219f470e0e497ca30b285c9f34948d3c8160d5ad3a755d9299433"}, + {file = "orjson-3.10.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2f3b7c5803138e67028dde33450e054c87e0703afbe730c105f1fcd873496d5"}, + {file = "orjson-3.10.11-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:f91d9eb554310472bd09f5347950b24442600594c2edc1421403d7610a0998fd"}, + {file = "orjson-3.10.11-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:dfbb2d460a855c9744bbc8e36f9c3a997c4b27d842f3d5559ed54326e6911f9b"}, + {file = "orjson-3.10.11-cp312-none-win32.whl", hash = "sha256:d4a62c49c506d4d73f59514986cadebb7e8d186ad510c518f439176cf8d5359d"}, + {file = "orjson-3.10.11-cp312-none-win_amd64.whl", hash = "sha256:f1eec3421a558ff7a9b010a6c7effcfa0ade65327a71bb9b02a1c3b77a247284"}, + {file = "orjson-3.10.11-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:c46294faa4e4d0eb73ab68f1a794d2cbf7bab33b1dda2ac2959ffb7c61591899"}, + {file = "orjson-3.10.11-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:52e5834d7d6e58a36846e059d00559cb9ed20410664f3ad156cd2cc239a11230"}, + {file = "orjson-3.10.11-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a2fc947e5350fdce548bfc94f434e8760d5cafa97fb9c495d2fef6757aa02ec0"}, + {file = "orjson-3.10.11-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0efabbf839388a1dab5b72b5d3baedbd6039ac83f3b55736eb9934ea5494d258"}, + {file = "orjson-3.10.11-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a3f29634260708c200c4fe148e42b4aae97d7b9fee417fbdd74f8cfc265f15b0"}, + {file = "orjson-3.10.11-cp313-none-win32.whl", hash = "sha256:1a1222ffcee8a09476bbdd5d4f6f33d06d0d6642df2a3d78b7a195ca880d669b"}, + {file = "orjson-3.10.11-cp313-none-win_amd64.whl", hash = "sha256:bc274ac261cc69260913b2d1610760e55d3c0801bb3457ba7b9004420b6b4270"}, + {file = "orjson-3.10.11-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:19b3763e8bbf8ad797df6b6b5e0fc7c843ec2e2fc0621398534e0c6400098f87"}, + {file = "orjson-3.10.11-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1be83a13312e5e58d633580c5eb8d0495ae61f180da2722f20562974188af205"}, + {file = "orjson-3.10.11-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:afacfd1ab81f46dedd7f6001b6d4e8de23396e4884cd3c3436bd05defb1a6446"}, + {file = "orjson-3.10.11-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cb4d0bea56bba596723d73f074c420aec3b2e5d7d30698bc56e6048066bd560c"}, + {file = "orjson-3.10.11-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:96ed1de70fcb15d5fed529a656df29f768187628727ee2788344e8a51e1c1350"}, + {file = "orjson-3.10.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4bfb30c891b530f3f80e801e3ad82ef150b964e5c38e1fb8482441c69c35c61c"}, + {file = "orjson-3.10.11-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:d496c74fc2b61341e3cefda7eec21b7854c5f672ee350bc55d9a4997a8a95204"}, + {file = "orjson-3.10.11-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:655a493bac606655db9a47fe94d3d84fc7f3ad766d894197c94ccf0c5408e7d3"}, + {file = "orjson-3.10.11-cp38-none-win32.whl", hash = "sha256:b9546b278c9fb5d45380f4809e11b4dd9844ca7aaf1134024503e134ed226161"}, + {file = "orjson-3.10.11-cp38-none-win_amd64.whl", hash = "sha256:b592597fe551d518f42c5a2eb07422eb475aa8cfdc8c51e6da7054b836b26782"}, + {file = "orjson-3.10.11-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:c95f2ecafe709b4e5c733b5e2768ac569bed308623c85806c395d9cca00e08af"}, + {file = "orjson-3.10.11-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80c00d4acded0c51c98754fe8218cb49cb854f0f7eb39ea4641b7f71732d2cb7"}, + {file = "orjson-3.10.11-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:461311b693d3d0a060439aa669c74f3603264d4e7a08faa68c47ae5a863f352d"}, + {file = "orjson-3.10.11-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:52ca832f17d86a78cbab86cdc25f8c13756ebe182b6fc1a97d534051c18a08de"}, + {file = "orjson-3.10.11-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f4c57ea78a753812f528178aa2f1c57da633754c91d2124cb28991dab4c79a54"}, + {file = "orjson-3.10.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b7fcfc6f7ca046383fb954ba528587e0f9336828b568282b27579c49f8e16aad"}, + {file = "orjson-3.10.11-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:86b9dd983857970c29e4c71bb3e95ff085c07d3e83e7c46ebe959bac07ebd80b"}, + {file = "orjson-3.10.11-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:4d83f87582d223e54efb2242a79547611ba4ebae3af8bae1e80fa9a0af83bb7f"}, + {file = "orjson-3.10.11-cp39-none-win32.whl", hash = "sha256:9fd0ad1c129bc9beb1154c2655f177620b5beaf9a11e0d10bac63ef3fce96950"}, + {file = "orjson-3.10.11-cp39-none-win_amd64.whl", hash = "sha256:10f416b2a017c8bd17f325fb9dee1fb5cdd7a54e814284896b7c3f2763faa017"}, + {file = "orjson-3.10.11.tar.gz", hash = "sha256:e35b6d730de6384d5b2dab5fd23f0d76fae8bbc8c353c2f78210aa5fa4beb3ef"}, ] [[package]] name = "packaging" -version = "24.1" +version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, - {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, + {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, + {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, ] [[package]] @@ -1334,17 +1334,6 @@ files = [ {file = "protobuf-4.25.5.tar.gz", hash = "sha256:7f8249476b4a9473645db7f8ab42b02fe1488cbe5fb72fddd445e0665afd8584"}, ] -[[package]] -name = "pycodestyle" -version = "2.12.1" -description = "Python style guide checker" -optional = false -python-versions = ">=3.8" -files = [ - {file = "pycodestyle-2.12.1-py2.py3-none-any.whl", hash = "sha256:46f0fb92069a7c28ab7bb558f05bfc0110dac69a0cd23c61ea0040283a9d78b3"}, - {file = "pycodestyle-2.12.1.tar.gz", hash = "sha256:6838eae08bbce4f6accd5d5572075c63626a15ee3e6f842df996bf62f6d73521"}, -] - [[package]] name = "pydantic" version = "2.9.2" @@ -1490,13 +1479,13 @@ testing = ["covdefaults (>=2.3)", "pytest (>=8.3.3)", "pytest-cov (>=5)", "pytes [[package]] name = "pytest" -version = "8.1.1" +version = "8.3.3" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.1.1-py3-none-any.whl", hash = "sha256:2a8386cfc11fa9d2c50ee7b2a57e7d898ef90470a7a34c4b949ff59662bb78b7"}, - {file = "pytest-8.1.1.tar.gz", hash = "sha256:ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044"}, + {file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"}, + {file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"}, ] [package.dependencies] @@ -1504,29 +1493,29 @@ colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" -pluggy = ">=1.4,<2.0" +pluggy = ">=1.5,<2" tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.21.1" +version = "0.24.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pytest-asyncio-0.21.1.tar.gz", hash = "sha256:40a7eae6dded22c7b604986855ea48400ab15b069ae38116e8c01238e9eeb64d"}, - {file = "pytest_asyncio-0.21.1-py3-none-any.whl", hash = "sha256:8666c1c8ac02631d7c51ba282e0c69a8a452b211ffedf2599099845da5c5c37b"}, + {file = "pytest_asyncio-0.24.0-py3-none-any.whl", hash = "sha256:a811296ed596b69bf0b6f3dc40f83bcaf341b155a269052d82efa2b25ac7037b"}, + {file = "pytest_asyncio-0.24.0.tar.gz", hash = "sha256:d081d828e576d85f875399194281e92bf8a68d60d72d1a2faf2feddb6c46b276"}, ] [package.dependencies] -pytest = ">=7.0.0" +pytest = ">=8.2,<9" [package.extras] docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] -testing = ["coverage (>=6.2)", "flaky (>=3.5.0)", "hypothesis (>=5.7.1)", "mypy (>=0.931)", "pytest-trio (>=0.7.0)"] +testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] name = "python-consul2-hh" @@ -1587,28 +1576,29 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "ruff" -version = "0.3.2" +version = "0.7.3" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.3.2-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:77f2612752e25f730da7421ca5e3147b213dca4f9a0f7e0b534e9562c5441f01"}, - {file = "ruff-0.3.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:9966b964b2dd1107797be9ca7195002b874424d1d5472097701ae8f43eadef5d"}, - {file = "ruff-0.3.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b83d17ff166aa0659d1e1deaf9f2f14cbe387293a906de09bc4860717eb2e2da"}, - {file = "ruff-0.3.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bb875c6cc87b3703aeda85f01c9aebdce3d217aeaca3c2e52e38077383f7268a"}, - {file = "ruff-0.3.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:be75e468a6a86426430373d81c041b7605137a28f7014a72d2fc749e47f572aa"}, - {file = "ruff-0.3.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:967978ac2d4506255e2f52afe70dda023fc602b283e97685c8447d036863a302"}, - {file = "ruff-0.3.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1231eacd4510f73222940727ac927bc5d07667a86b0cbe822024dd00343e77e9"}, - {file = "ruff-0.3.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2c6d613b19e9a8021be2ee1d0e27710208d1603b56f47203d0abbde906929a9b"}, - {file = "ruff-0.3.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c8439338a6303585d27b66b4626cbde89bb3e50fa3cae86ce52c1db7449330a7"}, - {file = "ruff-0.3.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:de8b480d8379620cbb5ea466a9e53bb467d2fb07c7eca54a4aa8576483c35d36"}, - {file = "ruff-0.3.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:b74c3de9103bd35df2bb05d8b2899bf2dbe4efda6474ea9681280648ec4d237d"}, - {file = "ruff-0.3.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:f380be9fc15a99765c9cf316b40b9da1f6ad2ab9639e551703e581a5e6da6745"}, - {file = "ruff-0.3.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:0ac06a3759c3ab9ef86bbeca665d31ad3aa9a4b1c17684aadb7e61c10baa0df4"}, - {file = "ruff-0.3.2-py3-none-win32.whl", hash = "sha256:9bd640a8f7dd07a0b6901fcebccedadeb1a705a50350fb86b4003b805c81385a"}, - {file = "ruff-0.3.2-py3-none-win_amd64.whl", hash = "sha256:0c1bdd9920cab5707c26c8b3bf33a064a4ca7842d91a99ec0634fec68f9f4037"}, - {file = "ruff-0.3.2-py3-none-win_arm64.whl", hash = "sha256:5f65103b1d76e0d600cabd577b04179ff592064eaa451a70a81085930e907d0b"}, - {file = "ruff-0.3.2.tar.gz", hash = "sha256:fa78ec9418eb1ca3db392811df3376b46471ae93792a81af2d1cbb0e5dcb5142"}, + {file = "ruff-0.7.3-py3-none-linux_armv6l.whl", hash = "sha256:34f2339dc22687ec7e7002792d1f50712bf84a13d5152e75712ac08be565d344"}, + {file = "ruff-0.7.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:fb397332a1879b9764a3455a0bb1087bda876c2db8aca3a3cbb67b3dbce8cda0"}, + {file = "ruff-0.7.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:37d0b619546103274e7f62643d14e1adcbccb242efda4e4bdb9544d7764782e9"}, + {file = "ruff-0.7.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d59f0c3ee4d1a6787614e7135b72e21024875266101142a09a61439cb6e38a5"}, + {file = "ruff-0.7.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:44eb93c2499a169d49fafd07bc62ac89b1bc800b197e50ff4633aed212569299"}, + {file = "ruff-0.7.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6d0242ce53f3a576c35ee32d907475a8d569944c0407f91d207c8af5be5dae4e"}, + {file = "ruff-0.7.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:6b6224af8b5e09772c2ecb8dc9f3f344c1aa48201c7f07e7315367f6dd90ac29"}, + {file = "ruff-0.7.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c50f95a82b94421c964fae4c27c0242890a20fe67d203d127e84fbb8013855f5"}, + {file = "ruff-0.7.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7f3eff9961b5d2644bcf1616c606e93baa2d6b349e8aa8b035f654df252c8c67"}, + {file = "ruff-0.7.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8963cab06d130c4df2fd52c84e9f10d297826d2e8169ae0c798b6221be1d1d2"}, + {file = "ruff-0.7.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:61b46049d6edc0e4317fb14b33bd693245281a3007288b68a3f5b74a22a0746d"}, + {file = "ruff-0.7.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:10ebce7696afe4644e8c1a23b3cf8c0f2193a310c18387c06e583ae9ef284de2"}, + {file = "ruff-0.7.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:3f36d56326b3aef8eeee150b700e519880d1aab92f471eefdef656fd57492aa2"}, + {file = "ruff-0.7.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:5d024301109a0007b78d57ab0ba190087b43dce852e552734ebf0b0b85e4fb16"}, + {file = "ruff-0.7.3-py3-none-win32.whl", hash = "sha256:4ba81a5f0c5478aa61674c5a2194de8b02652f17addf8dfc40c8937e6e7d79fc"}, + {file = "ruff-0.7.3-py3-none-win_amd64.whl", hash = "sha256:588a9ff2fecf01025ed065fe28809cd5a53b43505f48b69a1ac7707b1b7e4088"}, + {file = "ruff-0.7.3-py3-none-win_arm64.whl", hash = "sha256:1713e2c5545863cdbfe2cbce21f69ffaf37b813bfd1fb3b90dc9a6f1963f5a8c"}, + {file = "ruff-0.7.3.tar.gz", hash = "sha256:e1d1ba2e40b6e71a61b063354d04be669ab0d39c352461f3d789cac68b54a313"}, ] [[package]] @@ -1663,23 +1653,23 @@ tornado = ["tornado (>=5)"] [[package]] name = "setuptools" -version = "75.3.0" +version = "75.5.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "setuptools-75.3.0-py3-none-any.whl", hash = "sha256:f2504966861356aa38616760c0f66568e535562374995367b4e69c7143cf6bcd"}, - {file = "setuptools-75.3.0.tar.gz", hash = "sha256:fba5dd4d766e97be1b1681d98712680ae8f2f26d7881245f2ce9e40714f1a686"}, + {file = "setuptools-75.5.0-py3-none-any.whl", hash = "sha256:87cb777c3b96d638ca02031192d40390e0ad97737e27b6b4fa831bea86f2f829"}, + {file = "setuptools-75.5.0.tar.gz", hash = "sha256:5c4ccb41111392671f02bb5f8436dfc5a9a7185e80500531b133f5775c4163ef"}, ] [package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)", "ruff (>=0.5.2)"] -core = ["importlib-metadata (>=6)", "importlib-resources (>=5.10.2)", "jaraco.collections", "jaraco.functools", "jaraco.text (>=3.7)", "more-itertools", "more-itertools (>=8.8)", "packaging", "packaging (>=24)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)", "ruff (>=0.7.0)"] +core = ["importlib-metadata (>=6)", "jaraco.collections", "jaraco.functools (>=4)", "jaraco.text (>=3.7)", "more-itertools", "more-itertools (>=8.8)", "packaging", "packaging (>=24.2)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] enabler = ["pytest-enabler (>=2.2)"] -test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test (>=5.5)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] -type = ["importlib-metadata (>=7.0.2)", "jaraco.develop (>=7.21)", "mypy (==1.12.*)", "pytest-mypy"] +test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test (>=5.5)", "packaging (>=24.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] +type = ["importlib-metadata (>=7.0.2)", "jaraco.develop (>=7.21)", "mypy (>=1.12,<1.14)", "pytest-mypy"] [[package]] name = "six" @@ -2023,13 +2013,13 @@ multidict = ">=4.0" [[package]] name = "zipp" -version = "3.20.2" +version = "3.21.0" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "zipp-3.20.2-py3-none-any.whl", hash = "sha256:a817ac80d6cf4b23bf7f2828b7cabf326f15a001bea8b1f9b49631780ba28350"}, - {file = "zipp-3.20.2.tar.gz", hash = "sha256:bc9eb26f4506fda01b81bcde0ca78103b6e62f991b381fec825435c836edbc29"}, + {file = "zipp-3.21.0-py3-none-any.whl", hash = "sha256:ac1bbe05fd2991f160ebce24ffbac5f6d11d83dc90891255885223d42b3cd931"}, + {file = "zipp-3.21.0.tar.gz", hash = "sha256:2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4"}, ] [package.extras] @@ -2047,4 +2037,4 @@ testing = ["tornado-httpclient-mock"] [metadata] lock-version = "2.0" python-versions = "~=3.9" -content-hash = "c92fe7ca82ce14147baa9f52a9adb47140db0bae8eab0db0a18ec8283f6caf29" +content-hash = "5301019302967c1fd25a6602b37611656264300a295e3afeb6f9917a0d873ff3" diff --git a/pyproject.toml b/pyproject.toml index ec5ab2526..de4ad7f94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,15 +37,14 @@ tornado-httpclient-mock = '0.2.3' python-multipart = "^0.0.16" [tool.poetry.group.test.dependencies] -pytest = '8.1.1' -pytest-asyncio = '0.21.1' -pycodestyle = '>=2.5.0' +pytest = '8.3.3' +pytest-asyncio = '0.24.0' requests = '>=2.0' types-requests = '2.31.0.8' tox = '4.6.4' lxml-asserts = '0.1.2' mypy = '1.8.0' -ruff = '0.3.2' +ruff = '0.7.3' exceptiongroup = '1.2.0' tomli = '2.0.1' virtualenv = '<=20.26.0' @@ -116,11 +115,11 @@ ignore = [ 'DTZ005','FURB101','F841','TRY401','S403','PLR2004','ARG001','BLE001','B009','B010','C901','PLR0912','PLR0911', 'PLC0415','RUF003','TRY201','TRY300','S301','S102','S104','E721','PLW0603','RET503','PLR6201','PERF203', 'TRY003','EM102','RUF006','PYI055','RET501','PLC1901','RET502','PLC2801','EM101','B028','A002','DTZ006', - 'PLR0402','PYI024','PYI024','PLW2901','S701','UP006','UP035','PT005', + 'PLR0402','PYI024','PYI024','PLW2901','S701','UP006','UP035','PT005','A005','A004','B039', # should be ignored 'ANN101','ANN102','D102','D101','CPY001','D100','D107','D106','B008','D103','D104','D105','D202', 'RET505','RET506','RET504','RSE102','TCH003','TCH002', 'TCH001', - 'COM812', 'ISC001', 'PT015', 'FIX002' + 'COM812', 'ISC001', 'PT015', 'FIX002', 'RUF029' ] [tool.ruff.lint.isort] diff --git a/tests/projects/balancer_app/pages/retry_connect.py b/tests/projects/balancer_app/pages/retry_connect.py index 644117055..953068604 100644 --- a/tests/projects/balancer_app/pages/retry_connect.py +++ b/tests/projects/balancer_app/pages/retry_connect.py @@ -33,7 +33,7 @@ async def get_page(request: Request) -> str: if result.failed or result.data is None: raise HTTPError(500) - text = text + result.data + text += result.data return text diff --git a/tests/projects/balancer_app/pages/retry_connect_timeout.py b/tests/projects/balancer_app/pages/retry_connect_timeout.py index 0c329e762..ccd488b04 100644 --- a/tests/projects/balancer_app/pages/retry_connect_timeout.py +++ b/tests/projects/balancer_app/pages/retry_connect_timeout.py @@ -29,7 +29,7 @@ async def get_page(request: Request) -> str: if result.error or result.data is None: raise HTTPError(500) - text = text + result.data + text += result.data return text diff --git a/tests/projects/balancer_app/pages/retry_error.py b/tests/projects/balancer_app/pages/retry_error.py index c04e049ae..656f1dfc1 100644 --- a/tests/projects/balancer_app/pages/retry_error.py +++ b/tests/projects/balancer_app/pages/retry_error.py @@ -30,7 +30,7 @@ async def get_page(request: Request) -> str: if result.error or result.data is None: raise HTTPError(500) - text = text + result.data + text += result.data return text diff --git a/tests/projects/test_app/pages/module_not_found_error_on_import.py b/tests/projects/test_app/pages/module_not_found_error_on_import.py deleted file mode 100644 index 5d2cf85b6..000000000 --- a/tests/projects/test_app/pages/module_not_found_error_on_import.py +++ /dev/null @@ -1 +0,0 @@ -import tests.non.existing.module # noqa diff --git a/tests/projects/test_app/pages/module_starting_same_as_page_not_found_error_on_import.py b/tests/projects/test_app/pages/module_starting_same_as_page_not_found_error_on_import.py deleted file mode 100644 index c3f5426b9..000000000 --- a/tests/projects/test_app/pages/module_starting_same_as_page_not_found_error_on_import.py +++ /dev/null @@ -1 +0,0 @@ -import non.existing.module # noqa diff --git a/tests/test_cookies.py b/tests/test_cookies.py index 7b8a90ee4..eb325af58 100644 --- a/tests/test_cookies.py +++ b/tests/test_cookies.py @@ -15,7 +15,7 @@ async def cookies_page(response: Response) -> None: class TestCookies(FrontikTestBase): @pytest.fixture(scope='class') def frontik_app(self) -> FrontikApplication: - return FrontikApplication() + return FrontikApplication(app_module_name=None) async def test_cookies(self): response = await self.fetch('/cookies') diff --git a/tests/test_debug.py b/tests/test_debug.py index 7fc076343..0f3a1fdbc 100644 --- a/tests/test_debug.py +++ b/tests/test_debug.py @@ -84,7 +84,7 @@ async def put_debug_page(content_type: str = Query(alias='type')) -> Response: class TestDebug(FrontikTestBase): @pytest.fixture(scope='class') def frontik_app(self) -> FrontikApplication: - return FrontikApplication() + return FrontikApplication(app_module_name=None) def setup_method(self): options.debug = True @@ -169,7 +169,7 @@ class TestDebugFailed(FrontikTestBase): @pytest.fixture(scope='class') def frontik_app(self) -> FrontikApplication: - return FrontikApplication() + return FrontikApplication(app_module_name=None) def setup_method(self): options.debug_login = 'user' diff --git a/tests/test_default_urls.py b/tests/test_default_urls.py index 7b5f2d066..854de4986 100644 --- a/tests/test_default_urls.py +++ b/tests/test_default_urls.py @@ -9,7 +9,7 @@ class TestDefaultUrls(FrontikTestBase): @pytest.fixture(scope='class') def frontik_app(self) -> FrontikApplication: - return FrontikApplication() + return FrontikApplication(app_module_name=None) async def test_version(self) -> None: xml = await self.fetch_xml('/version') diff --git a/tests/test_errors.py b/tests/test_errors.py index 359377044..658b50b64 100644 --- a/tests/test_errors.py +++ b/tests/test_errors.py @@ -15,7 +15,7 @@ async def get_page(code: int = 200) -> None: class TestHttpError(FrontikTestBase): @pytest.fixture(scope='class') def frontik_app(self) -> FrontikApplication: - return FrontikApplication() + return FrontikApplication(app_module_name=None) async def test_raise_200(self): response = await self.fetch('/http_exception?code=200') diff --git a/tests/test_frontik_testing.py b/tests/test_frontik_testing.py index cd997b3d9..fb21f5eb9 100644 --- a/tests/test_frontik_testing.py +++ b/tests/test_frontik_testing.py @@ -41,7 +41,7 @@ async def post_page(request: Request) -> Any: class TestFrontikTesting(FrontikTestBase): @pytest.fixture(scope='class') def frontik_app(self) -> FrontikApplication: - return FrontikApplication() + return FrontikApplication(app_module_name=None) async def test_config(self): self.configure_app(config_param='param_value') diff --git a/tests/test_http_client.py b/tests/test_http_client.py index 245a07fe3..516913ab0 100644 --- a/tests/test_http_client.py +++ b/tests/test_http_client.py @@ -200,8 +200,8 @@ async def __call__(self, scope, receive, send) -> None: class ApplicationWithHttpClientHook(FrontikApplication): - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) + def __init__(self): + super().__init__(app_module_name=None) self.asgi_app.add_middleware(HttpclientHookMiddleware) @@ -265,7 +265,7 @@ async def long_request(request: Request) -> None: class TestRequestCanceled(FrontikTestBase): @pytest.fixture(scope='class') def frontik_app(self) -> FrontikApplication: - return FrontikApplication() + return FrontikApplication(app_module_name=None) async def test_request_canceled(self, caplog): caplog.handler.setFormatter(JSON_FORMATTER) diff --git a/tests/test_kafka_integration.py b/tests/test_kafka_integration.py index b034e67f3..384c526fe 100644 --- a/tests/test_kafka_integration.py +++ b/tests/test_kafka_integration.py @@ -57,7 +57,7 @@ class TestKafkaIntegration(FrontikTestBase): @pytest.fixture(scope='class') def frontik_app(self) -> FrontikApplication: options.service_name = 'test_kafka_integration' - return KafkaApplication() + return KafkaApplication(app_module_name=None) async def test_kafka(self): response_json = await self.fetch_json('/kafka') diff --git a/tests/test_legacy_supported.py b/tests/test_legacy_supported.py index 86df1d57e..52500928f 100644 --- a/tests/test_legacy_supported.py +++ b/tests/test_legacy_supported.py @@ -18,7 +18,7 @@ async def legacy_supported_page(request: Request) -> bool: class TestLegacySupported(FrontikTestBase): @pytest.fixture(scope='class') def frontik_app(self) -> FrontikApplication: - return FrontikApplication() + return FrontikApplication(app_module_name=None) async def test_config(self): response = await self.fetch('/legacy_supported') diff --git a/tests/test_logging.py b/tests/test_logging.py index a6adb7476..79d2c2068 100644 --- a/tests/test_logging.py +++ b/tests/test_logging.py @@ -62,7 +62,7 @@ class TestSyslog(FrontikTestBase): @pytest.fixture(scope='class') def frontik_app(self) -> FrontikApplication: - return FrontikApplication() + return FrontikApplication(app_module_name=None) @classmethod def setup_class(cls): @@ -209,7 +209,7 @@ class TestLogToFile(FrontikTestBase): @pytest.fixture(scope='class') def frontik_app(self) -> FrontikApplication: - return FrontikApplication() + return FrontikApplication(app_module_name=None) @classmethod def setup_class(cls): diff --git a/tests/test_logging_configurator_client.py b/tests/test_logging_configurator_client.py index b8663d243..03ccfecd8 100644 --- a/tests/test_logging_configurator_client.py +++ b/tests/test_logging_configurator_client.py @@ -1,8 +1,6 @@ import logging import unittest -import pytest as pytest - from frontik.loggers.logleveloverride.log_level_override_extension import LogLevelOverride, LogLevelOverrideExtension from frontik.loggers.logleveloverride.logging_configurator_client import LoggingConfiguratorClient @@ -28,12 +26,10 @@ def tearDown(self) -> None: MOCK_LOG_OVERRIDE_DTO.append(LogLevelOverride('b', 'INFO')) MOCK_LOG_OVERRIDE_DTO.append(LogLevelOverride('c', 'WARN')) - @pytest.mark.asyncio() async def test_simple_override(self): await self.logging_configurator_client._update_log_level() self.assertEqual(len(self.logging_configurator_client._loggers_store), 3) - @pytest.mark.asyncio() async def test_override_and_remove(self): await self.logging_configurator_client._update_log_level() self.assertEqual(len(self.logging_configurator_client._loggers_store), 3) @@ -43,7 +39,6 @@ async def test_override_and_remove(self): await self.logging_configurator_client._update_log_level() self.assertEqual(len(self.logging_configurator_client._loggers_store), 0) - @pytest.mark.asyncio() async def test_override_and_after_change_level(self): await self.logging_configurator_client._update_log_level() self.assertEqual(logging.getLogger('a').level, logging.DEBUG) @@ -54,7 +49,6 @@ async def test_override_and_after_change_level(self): await self.logging_configurator_client._update_log_level() self.assertEqual(logging.getLogger('a').level, logging.INFO) - @pytest.mark.asyncio() async def test_level_with_handlers(self): logging.getLogger().handlers.append(logging.Handler()) await self.logging_configurator_client._update_log_level() @@ -73,7 +67,6 @@ async def test_level_with_handlers(self): self.assertEqual(logging.getLogger('b').handlers[0].level, logging.INFO) self.assertEqual(logging.getLogger('c').handlers[0].level, logging.INFO) - @pytest.mark.asyncio() async def test_not_add_root_handlers_if_exist_on_specific_logger(self): logging.getLogger().handlers.append(logging.Handler()) logging.getLogger().handlers.append(logging.Handler()) diff --git a/tests/test_no_debug_mode.py b/tests/test_no_debug_mode.py index 2ace3aa66..f79f07ff2 100644 --- a/tests/test_no_debug_mode.py +++ b/tests/test_no_debug_mode.py @@ -38,7 +38,7 @@ def frontik_app(self) -> FrontikApplication: options.debug = False options.debug_login = 'user' options.debug_password = 'god' - return FrontikApplication() + return FrontikApplication(app_module_name=None) async def test_simple(self): response = await self.fetch('/simple') diff --git a/tests/test_request.py b/tests/test_request.py index a90ce0b0b..94d031163 100644 --- a/tests/test_request.py +++ b/tests/test_request.py @@ -17,7 +17,7 @@ async def echo_handler(request: Request) -> Response: class TestStreamingRequest(FrontikTestBase): @pytest.fixture(scope='class') def frontik_app(self) -> FrontikApplication: - return FrontikApplication() + return FrontikApplication(app_module_name=None) async def test_post_request_with_body(self): response = await self.fetch( diff --git a/tests/test_request_context.py b/tests/test_request_context.py index b1ada8d89..f89d81700 100644 --- a/tests/test_request_context.py +++ b/tests/test_request_context.py @@ -14,7 +14,7 @@ async def get_page(): class TestRequestContext(FrontikTestBase): @pytest.fixture(scope='class') def frontik_app(self) -> FrontikApplication: - return FrontikApplication() + return FrontikApplication(app_module_name=None) async def test_request_context(self): response = await self.fetch('/request_context') diff --git a/tests/test_request_id.py b/tests/test_request_id.py index d1c7faf04..e58c809c3 100644 --- a/tests/test_request_id.py +++ b/tests/test_request_id.py @@ -24,7 +24,7 @@ async def asgi_request_id_long_page() -> None: class TestRequestId(FrontikTestBase): @pytest.fixture(scope='class') def frontik_app(self) -> FrontikApplication: - return FrontikApplication() + return FrontikApplication(app_module_name=None) async def test_asgi_request_id(self): response = await self.fetch('/asgi_request_id') diff --git a/tests/test_routing.py b/tests/test_routing.py index 5e57defe6..7a7580fe9 100644 --- a/tests/test_routing.py +++ b/tests/test_routing.py @@ -29,7 +29,7 @@ async def nested_page() -> str: class TestRouting(FrontikTestBase): @pytest.fixture(scope='class') def frontik_app(self) -> FrontikApplication: - return FrontikApplication() + return FrontikApplication(app_module_name=None) async def test_extra_slash_in_mapping(self): response = await self.fetch('//not_simple') diff --git a/tests/test_sentry_integration.py b/tests/test_sentry_integration.py index 3f3d5d902..16a9fae4d 100644 --- a/tests/test_sentry_integration.py +++ b/tests/test_sentry_integration.py @@ -59,7 +59,7 @@ def teardown_method(self, method): def frontik_app(self, _bind_socket) -> FrontikApplication: # type: ignore options.sentry_dsn = f'http://secret@127.0.0.1:{options.port}/2' sentry_sdk.set_user({'id': '123456'}) - return FrontikApplication() + return FrontikApplication(app_module_name=None) async def test_sentry_exception(self): await self.fetch('/sentry_error?ip=127.0.0.77&extra_key=extra_val') @@ -110,7 +110,7 @@ async def test_sentry_http_error(self): class TestWithoutSentryIntegration(FrontikTestBase): @pytest.fixture(scope='class') def frontik_app(self) -> FrontikApplication: - return FrontikApplication() + return FrontikApplication(app_module_name=None) def test_sentry_not_configured(self): assert not options.sentry_dsn diff --git a/tests/test_statsd_integration.py b/tests/test_statsd_integration.py index ca167eb90..2c940b997 100644 --- a/tests/test_statsd_integration.py +++ b/tests/test_statsd_integration.py @@ -34,7 +34,7 @@ def statsd_socket(self) -> socket.socket: @pytest.fixture(scope='class') def frontik_app(self, statsd_socket) -> FrontikApplication: # type: ignore - return FrontikApplication() + return FrontikApplication(app_module_name=None) async def test_send_to_statsd(self, statsd_socket): await self.fetch('/statsd') diff --git a/tests/test_streaming_request.py b/tests/test_streaming_request.py index d32cb56bf..9d8034e13 100644 --- a/tests/test_streaming_request.py +++ b/tests/test_streaming_request.py @@ -27,7 +27,7 @@ async def get_page(request: Request) -> Response: class TestStreamingRequest(FrontikTestBase): @pytest.fixture(scope='class') def frontik_app(self) -> FrontikApplication: - return FrontikApplication() + return FrontikApplication(app_module_name=None) async def test_streaming_request(self): await self.fetch( diff --git a/tests/test_streaming_response.py b/tests/test_streaming_response.py index 0cf13ba18..bd7aa4932 100644 --- a/tests/test_streaming_response.py +++ b/tests/test_streaming_response.py @@ -21,7 +21,7 @@ async def iterable() -> AsyncIterable: class TestStreamingResponse(FrontikTestBase): @pytest.fixture(scope='class') def frontik_app(self) -> FrontikApplication: - return FrontikApplication() + return FrontikApplication(app_module_name=None) async def test_streaming_response(self): response = await self.fetch('/stream') diff --git a/tests/test_telemetry.py b/tests/test_telemetry.py index ccc36a5b1..c56b50723 100644 --- a/tests/test_telemetry.py +++ b/tests/test_telemetry.py @@ -103,7 +103,7 @@ def frontik_app(self) -> FrontikApplication: options.opentelemetry_enabled = True options.opentelemetry_sampler_ratio = 1 - app = FrontikApplication() + app = FrontikApplication(app_module_name=None) test_exporter = TestExporter() provider = make_otel_provider(app)