Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: turn on deprecation warning and upgrade jsonlogger #88

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
Loading