Skip to content

Commit 921a8ba

Browse files
authored
fix: turn on deprecation warning and upgrade jsonlogger (#88)
1 parent 9585bbb commit 921a8ba

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

daiquiri/formatter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import logging
1515
import typing
1616

17-
from pythonjsonlogger import jsonlogger
17+
from pythonjsonlogger import json as jsonlogger
1818

1919
from daiquiri import types
2020

@@ -157,7 +157,7 @@ def format(self, record: logging.LogRecord) -> str:
157157
return s
158158

159159

160-
class DatadogFormatter(jsonlogger.JsonFormatter): # type: ignore[misc]
160+
class DatadogFormatter(jsonlogger.JsonFormatter):
161161
def __init__(self) -> None:
162162
super(DatadogFormatter, self).__init__(timestamp=True)
163163

pyproject.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ classifiers = [
2525
"Programming Language :: Python :: 3.13",
2626
]
2727
dependencies = [
28-
"python-json-logger"
28+
"python-json-logger >= 3"
2929
]
3030

3131
[project.urls]
@@ -55,4 +55,10 @@ strict = true
5555
module = [
5656
"systemd",
5757
]
58-
ignore_missing_imports = true
58+
ignore_missing_imports = true
59+
60+
[tool.pytest.ini_options]
61+
filterwarnings = [
62+
"error::DeprecationWarning",
63+
]
64+
testpaths = ["daiquiri/tests"]

0 commit comments

Comments
 (0)