From 75df227298fa0e227c7efd5f3c6a64eef1af24c0 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Tue, 17 Dec 2024 12:48:14 +0000 Subject: [PATCH] Resolve DeprecationWarning fsd_utils/logging/__init__.py:2: in from . import logging fsd_utils/logging/logging.py:13: in from pythonjsonlogger.jsonlogger import JsonFormatter as BaseJSONFormatter .tox/py3.10-flask2.2-sqlalchemy2/lib/python3.10/site-packages/pythonjsonlogger/jsonlogger.py:11: in warnings.warn( E DeprecationWarning: pythonjsonlogger.jsonlogger has been moved to pythonjsonlogger.json Update version to 5.3.1 --- CHANGELOG.md | 4 ++++ fsd_utils/logging/logging.py | 2 +- pyproject.toml | 2 +- uv.lock | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c1a3ac..ee2c05d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### 5.3.1 + +* Fix a DeprecationWarning from pythonjsonlogger + ### 5.3.0 * Update the Healthcheck to support apps running in `host_matching` mode. diff --git a/fsd_utils/logging/logging.py b/fsd_utils/logging/logging.py index ee051c5..c519ce2 100644 --- a/fsd_utils/logging/logging.py +++ b/fsd_utils/logging/logging.py @@ -10,7 +10,7 @@ from flask import Flask, current_app, request from flask.ctx import has_request_context -from pythonjsonlogger.jsonlogger import JsonFormatter as BaseJSONFormatter +from pythonjsonlogger.json import JsonFormatter as BaseJSONFormatter # Log formats can use any attributes available in # https://docs.python.org/3/library/logging.html#logrecord-attributes diff --git a/pyproject.toml b/pyproject.toml index 1956d0a..c54f905 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "funding-service-design-utils" -version = "5.3.0" +version = "5.3.1" authors = [ { name="MHCLG", email="FundingService@communities.gov.uk" }, diff --git a/uv.lock b/uv.lock index 6d7d1ac..6aff2e7 100644 --- a/uv.lock +++ b/uv.lock @@ -406,7 +406,7 @@ wheels = [ [[package]] name = "funding-service-design-utils" -version = "5.3.0" +version = "5.3.1" source = { editable = "." } dependencies = [ { name = "beautifulsoup4" },