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

Update for new pythonjsonlogger #30

Merged
merged 3 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.2
rev: v0.8.3
hooks:
# Run the linter.
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion annotated_logger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class AnnotatedClass(Protocol[C_co]):
},
"formatters": {
"annotated_formatter": {
"class": "pythonjsonlogger.jsonlogger.JsonFormatter", # pragma: no mutate
"class": "pythonjsonlogger.json.JsonFormatter", # pragma: no mutate
"format": "{created} {levelname} {name} {message}", # pragma: no mutate
"style": "{",
},
Expand Down
4 changes: 2 additions & 2 deletions example/logging_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
},
"formatters": {
"logging_config.annotated_formatter": {
"class": "pythonjsonlogger.jsonlogger.JsonFormatter",
"class": "pythonjsonlogger.json.JsonFormatter",
# Note that this format string uses `time` which is set by the renamer
# plugin. It also has `lvl` which is there strictly to test our fallback
# to using `levelno` in the mocks to determine level.
Expand All @@ -116,7 +116,7 @@
"style": "{",
},
"logging_config.weird_formatter": {
"class": "pythonjsonlogger.jsonlogger.JsonFormatter",
"class": "pythonjsonlogger.json.JsonFormatter",
"format": "{time} {lvl} {name} {message}",
"style": "{",
},
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ keywords = [
]
dependencies = [
"makefun",
"python-json-logger",
"python-json-logger>=3.1.0",
"requests",
# The mock makes use of this, but we really should separate the mock out into it's own package
# That would allow the mock to be included in dev, not in prod
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ makefun==1.15.6
# via hatch.envs.default
pychoir==0.0.27
# via hatch.envs.default
python-json-logger==2.0.7
python-json-logger==3.2.0
# via hatch.envs.default
requests==2.32.3
# via hatch.envs.default
Expand Down
10 changes: 5 additions & 5 deletions requirements/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# - typing_extensions
# - makefun
# - pychoir
# - python-json-logger
# - python-json-logger>=3.1.0
# - requests
#

Expand Down Expand Up @@ -95,7 +95,7 @@ pytest==8.3.4
# pytest-randomly
pytest-cov==6.0.0
# via hatch.envs.dev
pytest-freezer==0.4.8
pytest-freezer==0.4.9
# via hatch.envs.dev
pytest-github-actions-annotate-failures==0.2.0
# via hatch.envs.dev
Expand All @@ -105,7 +105,7 @@ pytest-randomly==3.16.0
# via hatch.envs.dev
python-dateutil==2.9.0.post0
# via freezegun
python-json-logger==2.0.7
python-json-logger==3.2.0
# via hatch.envs.dev
pyyaml==6.0.2
# via pre-commit
Expand All @@ -117,15 +117,15 @@ requests-mock==1.12.1
# via hatch.envs.dev
rich==13.9.4
# via textual
ruff==0.8.2
ruff==0.8.3
# via hatch.envs.dev
setproctitle==1.3.4
# via mutmut
six==1.17.0
# via
# junit-xml
# python-dateutil
textual==0.89.1
textual==1.0.0
# via mutmut
toml==0.10.2
# via mutmut
Expand Down
Loading