Skip to content

fix(logging): replace deprecated pythonjsonlogger.jsonlogger import - #8

Closed
jonpspri wants to merge 1 commit into
mainfrom
fix/jsonlogger-deprecation
Closed

fix(logging): replace deprecated pythonjsonlogger.jsonlogger import#8
jonpspri wants to merge 1 commit into
mainfrom
fix/jsonlogger-deprecation

Conversation

@jonpspri

Copy link
Copy Markdown
Collaborator

python-json-logger moved JsonFormatter from pythonjsonlogger.jsonlogger to pythonjsonlogger.json; the old compatibility shim emits a DeprecationWarning on every import:

pythonjsonlogger/jsonlogger.py:11: DeprecationWarning: pythonjsonlogger.jsonlogger has been moved to pythonjsonlogger.json

Changes

  • src/mcp_reverse_proxy/logging_config.py: import JsonFormatter from pythonjsonlogger.json directly and use it as the CorrelationIdJsonFormatter base class. No behavioral change — same class, same import target the shim re-exports.

Verification

  • Module imports clean under -W error::DeprecationWarning; JSON formatter output unchanged (timestamp, level, logger, hostname, pid fields intact).
  • 129 unit tests pass (pytest tests -m 'not integration').

python-json-logger moved JsonFormatter from pythonjsonlogger.jsonlogger
to pythonjsonlogger.json; the old shim emits a DeprecationWarning on
every import.
@jonpspri jonpspri closed this Sep 11, 2026
@jonpspri
jonpspri deleted the fix/jsonlogger-deprecation branch September 11, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant