diff --git a/pyproject.toml b/pyproject.toml index 234a620..8786562 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,7 @@ authors = [ requires-python = ">=3.14" dependencies = [ "pydantic>=2.13.5", + "pydantic-settings>=2.15.0", "pytest>=9.1.1", "tk>=0.1.0", "twine>=7.0.0", diff --git a/test/test_logging_config.py b/test/test_logging_config.py index 5c3aab0..b28f059 100755 --- a/test/test_logging_config.py +++ b/test/test_logging_config.py @@ -7,10 +7,10 @@ from pathlib import Path from unittest.mock import patch import pytest +from pydantic import ValidationError from uvicorn.logging import DefaultFormatter -from dataflex_backend_common.logging_config import LoggingSettings -from pydantic import ValidationError +from utils.logging_config import LoggingSettings SECONDS_PER_DAY = 24 * 60 * 60 @@ -41,7 +41,7 @@ def test_sets_valid_log_level(restore_root_logger: None) -> None: def test_invalid_log_level_falls_back_to_info(restore_root_logger: None) -> None: - with patch("dataflex_backend_common.logging_config.logger.error") as log_error: + with patch("utils.logging_config.logger.error") as log_error: LoggingSettings(LOG_LEVEL="NOT_A_LEVEL", LOG_TO_FILE=False) assert logging.getLogger().level == logging.INFO diff --git a/uv.lock b/uv.lock index ff5fb35..351d4d9 100644 --- a/uv.lock +++ b/uv.lock @@ -464,6 +464,20 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/63/19/67830dda664e6bdf9285ee2e40f355d0d7d6b92aa0c42e8d217bb8d33d36/pydantic_core-2.46.5-cp314-cp314t-win_arm64.whl", hash = "sha256:acf8a67ba51f4ca9ddbd0e6b3000a65ac51ab734661778b3e7ba64d99a710f2f", size = 1989276, upload-time = "2026-08-28T10:00:16.984Z" }, ] +[[package]] +name = "pydantic-settings" +version = "2.15.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pydantic" }, + { name = "python-dotenv" }, + { name = "typing-inspection" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/68/ca/31c57507b13119d7d3cfa1576dad2911a4861e3be07b579395f4e9d393f9/pydantic_settings-2.15.0.tar.gz", hash = "sha256:694b793e84f766ba76a90ebdefc01d0a9a045dab0382bee70393da93712ad117", size = 261253, upload-time = "2026-08-07T09:24:57.419Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/30/a4/2bffa9f8e804325a09867f0e9d30795c80ea9f8d62560bd1b6ad6220eb2f/pydantic_settings-2.15.0-py3-none-any.whl", hash = "sha256:0ba092c291c94baceb5eff768aa0d56400a457585bc0175925a5a5510303da42", size = 69413, upload-time = "2026-08-07T09:24:55.839Z" }, +] + [[package]] name = "pygments" version = "2.21.0" @@ -489,6 +503,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536, upload-time = "2026-06-19T10:58:31.347Z" }, ] +[[package]] +name = "python-dotenv" +version = "1.2.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/74/26/2fbeedb218a787a5eea551c7532cac4e009f83d689dd2faa0d0353473f86/python_dotenv-1.2.4.tar.gz", hash = "sha256:f0d53e69935a851c0dcc78f3ab7aaccd8cabef0b92382b576b824212902873c0", size = 60824, upload-time = "2026-10-01T05:36:10Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/60/d1/38f3a3405989a89ac18390803e70c6ad7c7760da4f9b83cbeca0c44a0c72/python_dotenv-1.2.4-py3-none-any.whl", hash = "sha256:42269a8a5b3fd54ffa6f3d84b18abed50064717576b4ecf03dc4a55d8aa04fdc", size = 23266, upload-time = "2026-10-01T05:36:08.633Z" }, +] + [[package]] name = "pywin32-ctypes" version = "0.2.3" @@ -639,6 +662,7 @@ version = "0.1.1" source = { editable = "." } dependencies = [ { name = "pydantic" }, + { name = "pydantic-settings" }, { name = "pytest" }, { name = "tk" }, { name = "twine" }, @@ -648,6 +672,7 @@ dependencies = [ [package.metadata] requires-dist = [ { name = "pydantic", specifier = ">=2.13.5" }, + { name = "pydantic-settings", specifier = ">=2.15.0" }, { name = "pytest", specifier = ">=9.1.1" }, { name = "tk", specifier = ">=0.1.0" }, { name = "twine", specifier = ">=7.0.0" },