From d37c9496552adb524cc0f12c02da38a030efc1ab Mon Sep 17 00:00:00 2001 From: Jakob Schlyter Date: Thu, 9 Jan 2025 09:14:13 +0100 Subject: [PATCH] Handle clients_database as string (#141) --- aggrec/server.py | 2 +- aggrec/settings.py | 4 ++-- poetry.lock | 38 +++++++++++++++++++------------------- pyproject.toml | 2 +- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/aggrec/server.py b/aggrec/server.py index 0affe8f..a94b7e0 100644 --- a/aggrec/server.py +++ b/aggrec/server.py @@ -46,7 +46,7 @@ def __init__(self, settings: Settings): self.logger.info("Configured without OpenTelemetry") key_cache = key_cache_from_settings(self.settings.key_cache) if self.settings.key_cache else None self.key_resolver = key_resolver_from_client_database( - client_database=str(self.settings.clients_database), key_cache=key_cache + client_database=self.settings.clients_database, key_cache=key_cache ) self.mqtt_new_aggregate_messages = asyncio.Queue(maxsize=self.settings.mqtt.queue_size) diff --git a/aggrec/settings.py b/aggrec/settings.py index 7b4d295..3aa03b4 100644 --- a/aggrec/settings.py +++ b/aggrec/settings.py @@ -1,7 +1,7 @@ from datetime import datetime, timezone from typing import Annotated -from pydantic import AnyHttpUrl, BaseModel, DirectoryPath, Field, UrlConstraints +from pydantic import AnyHttpUrl, BaseModel, Field, UrlConstraints from pydantic_core import Url from pydantic_settings import BaseSettings, PydanticBaseSettingsSource, SettingsConfigDict, TomlConfigSettingsSource @@ -46,7 +46,7 @@ def get_bucket_name(self) -> str: class Settings(BaseSettings): metadata_base_url: AnyHttpUrl = Field(default="http://127.0.0.1") - clients_database: DirectoryPath | AnyHttpUrl = Field(default="clients") + clients_database: str = Field(default="clients") s3: S3 = Field(default=S3()) mqtt: MqttSettings = Field(default=MqttSettings()) mongodb: MongoDB = Field(default=MongoDB()) diff --git a/poetry.lock b/poetry.lock index c0cb508..56497a0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -585,7 +585,7 @@ wmi = ["wmi (>=1.5.1)"] [[package]] name = "dnstapir" -version = "1.2.2" +version = "1.2.3" description = "DNS TAPIR Python Library" optional = false python-versions = "^3.11" @@ -616,8 +616,8 @@ opentelemetry = ["botocore (>=1.35.82,<2.0.0)", "fastapi (>=0.115.2)", "opentele [package.source] type = "git" url = "https://github.com/dnstapir/python-dnstapir.git" -reference = "v1.2.2" -resolved_reference = "d104c5a3e2d5f0e89d1063b1652abd6acce5ade9" +reference = "v1.2.3" +resolved_reference = "b6dd5479bcc2ff395bc8e8201c0d35107f653c28" [[package]] name = "faas-cache-dict" @@ -1760,22 +1760,22 @@ files = [ [[package]] name = "protobuf" -version = "5.29.2" +version = "5.29.3" description = "" optional = false python-versions = ">=3.8" files = [ - {file = "protobuf-5.29.2-cp310-abi3-win32.whl", hash = "sha256:c12ba8249f5624300cf51c3d0bfe5be71a60c63e4dcf51ffe9a68771d958c851"}, - {file = "protobuf-5.29.2-cp310-abi3-win_amd64.whl", hash = "sha256:842de6d9241134a973aab719ab42b008a18a90f9f07f06ba480df268f86432f9"}, - {file = "protobuf-5.29.2-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:a0c53d78383c851bfa97eb42e3703aefdc96d2036a41482ffd55dc5f529466eb"}, - {file = "protobuf-5.29.2-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:494229ecd8c9009dd71eda5fd57528395d1eacdf307dbece6c12ad0dd09e912e"}, - {file = "protobuf-5.29.2-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:b6b0d416bbbb9d4fbf9d0561dbfc4e324fd522f61f7af0fe0f282ab67b22477e"}, - {file = "protobuf-5.29.2-cp38-cp38-win32.whl", hash = "sha256:e621a98c0201a7c8afe89d9646859859be97cb22b8bf1d8eacfd90d5bda2eb19"}, - {file = "protobuf-5.29.2-cp38-cp38-win_amd64.whl", hash = "sha256:13d6d617a2a9e0e82a88113d7191a1baa1e42c2cc6f5f1398d3b054c8e7e714a"}, - {file = "protobuf-5.29.2-cp39-cp39-win32.whl", hash = "sha256:36000f97ea1e76e8398a3f02936aac2a5d2b111aae9920ec1b769fc4a222c4d9"}, - {file = "protobuf-5.29.2-cp39-cp39-win_amd64.whl", hash = "sha256:2d2e674c58a06311c8e99e74be43e7f3a8d1e2b2fdf845eaa347fbd866f23355"}, - {file = "protobuf-5.29.2-py3-none-any.whl", hash = "sha256:fde4554c0e578a5a0bcc9a276339594848d1e89f9ea47b4427c80e5d72f90181"}, - {file = "protobuf-5.29.2.tar.gz", hash = "sha256:b2cc8e8bb7c9326996f0e160137b0861f1a82162502658df2951209d0cb0309e"}, + {file = "protobuf-5.29.3-cp310-abi3-win32.whl", hash = "sha256:3ea51771449e1035f26069c4c7fd51fba990d07bc55ba80701c78f886bf9c888"}, + {file = "protobuf-5.29.3-cp310-abi3-win_amd64.whl", hash = "sha256:a4fa6f80816a9a0678429e84973f2f98cbc218cca434abe8db2ad0bffc98503a"}, + {file = "protobuf-5.29.3-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:a8434404bbf139aa9e1300dbf989667a83d42ddda9153d8ab76e0d5dcaca484e"}, + {file = "protobuf-5.29.3-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:daaf63f70f25e8689c072cfad4334ca0ac1d1e05a92fc15c54eb9cf23c3efd84"}, + {file = "protobuf-5.29.3-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:c027e08a08be10b67c06bf2370b99c811c466398c357e615ca88c91c07f0910f"}, + {file = "protobuf-5.29.3-cp38-cp38-win32.whl", hash = "sha256:84a57163a0ccef3f96e4b6a20516cedcf5bb3a95a657131c5c3ac62200d23252"}, + {file = "protobuf-5.29.3-cp38-cp38-win_amd64.whl", hash = "sha256:b89c115d877892a512f79a8114564fb435943b59067615894c3b13cd3e1fa107"}, + {file = "protobuf-5.29.3-cp39-cp39-win32.whl", hash = "sha256:0eb32bfa5219fc8d4111803e9a690658aa2e6366384fd0851064b963b6d1f2a7"}, + {file = "protobuf-5.29.3-cp39-cp39-win_amd64.whl", hash = "sha256:6ce8cc3389a20693bfde6c6562e03474c40851b44975c9b2bf6df7d8c4f864da"}, + {file = "protobuf-5.29.3-py3-none-any.whl", hash = "sha256:0a18ed4a24198528f2333802eb075e59dea9d679ab7a6c5efb017a59004d849f"}, + {file = "protobuf-5.29.3.tar.gz", hash = "sha256:5da0f41edaf117bde316404bad1a486cb4ededf8e4a54891296f648e8e076620"}, ] [[package]] @@ -2044,13 +2044,13 @@ dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments [[package]] name = "pytest-asyncio" -version = "0.25.1" +version = "0.25.2" description = "Pytest support for asyncio" optional = false python-versions = ">=3.9" files = [ - {file = "pytest_asyncio-0.25.1-py3-none-any.whl", hash = "sha256:c84878849ec63ff2ca509423616e071ef9cd8cc93c053aa33b5b8fb70a990671"}, - {file = "pytest_asyncio-0.25.1.tar.gz", hash = "sha256:79be8a72384b0c917677e00daa711e07db15259f4d23203c59012bcd989d4aee"}, + {file = "pytest_asyncio-0.25.2-py3-none-any.whl", hash = "sha256:0d0bb693f7b99da304a0634afc0a4b19e49d5e0de2d670f38dc4bfa5727c5075"}, + {file = "pytest_asyncio-0.25.2.tar.gz", hash = "sha256:3f8ef9a98f45948ea91a0ed3dc4268b5326c0e7bce73892acc654df4262ad45f"}, ] [package.dependencies] @@ -2579,4 +2579,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "7fd44393c70e2505e55cd5b0cee47da5965f987b78ab9df4b36d1bc7a5dfc47e" +content-hash = "d4e005c732e75b21c865c5d1f86c897981ef20b209c3c3dc456fca303f25b737" diff --git a/pyproject.toml b/pyproject.toml index 08cb64b..801a819 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ aggrec_client = "aggrec.client:main" [tool.poetry.dependencies] python = "^3.12" -dnstapir = {git = "https://github.com/dnstapir/python-dnstapir.git", rev = "v1.2.2", extras = ["keymanager", "opentelemetry"]} +dnstapir = {git = "https://github.com/dnstapir/python-dnstapir.git", rev = "v1.2.3", extras = ["keymanager", "opentelemetry"]} mongoengine = "^0.29.0" http-message-signatures = ">=0.5.0" requests = "^2.30.0"