Skip to content

Commit

Permalink
fix: turn on deprecation warning and upgrade jsonlogger (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
jd authored Dec 13, 2024
1 parent 9585bbb commit 921a8ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions daiquiri/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import logging
import typing

from pythonjsonlogger import jsonlogger
from pythonjsonlogger import json as jsonlogger

from daiquiri import types

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


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

Expand Down
10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ classifiers = [
"Programming Language :: Python :: 3.13",
]
dependencies = [
"python-json-logger"
"python-json-logger >= 3"
]

[project.urls]
Expand Down Expand Up @@ -55,4 +55,10 @@ strict = true
module = [
"systemd",
]
ignore_missing_imports = true
ignore_missing_imports = true

[tool.pytest.ini_options]
filterwarnings = [
"error::DeprecationWarning",
]
testpaths = ["daiquiri/tests"]

0 comments on commit 921a8ba

Please sign in to comment.