Skip to content

chore: silence test deprecation warnings (pythonjsonlogger, pytest-asyncio) - #341

Merged
chigwell merged 1 commit into
chigwell:mainfrom
axisrow:chore/silence-deprecation-warnings
Oct 20, 2026
Merged

chigwell merged 1 commit into
chigwell:mainfrom
axisrow:chore/silence-deprecation-warnings

Conversation

@axisrow

@axisrow axisrow commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Two deprecation warnings show up in every pytest run:

  1. pythonjsonlogger.jsonlogger has been moved to pythonjsonlogger.json — the import in runtime.py now uses pythonjsonlogger.json.JsonFormatter directly. The declared floor (python-json-logger>=3.3.0) already guarantees the new module exists, so no compatibility shim is needed.
  2. pytest-asyncio's asyncio_default_fixture_loop_scope is unset — pinned to "function" in [tool.pytest.ini_options], matching the current behavior, before a future pytest-asyncio release flips the default.

pytest -q now completes with no warnings summary.

🤖 Generated with Claude Code

- import JsonFormatter from pythonjsonlogger.json: the legacy
  pythonjsonlogger.jsonlogger module emits a DeprecationWarning since
  python-json-logger 3.1 (declared floor here is >=3.3.0, so the new
  module is always available)
- set asyncio_default_fixture_loop_scope = "function" to pin the
  pytest-asyncio loop scope before it flips in a future release

pytest now completes with no warnings summary.

Co-Authored-By: Claude Code <[email protected]>
@chigwell
chigwell merged commit 8b0fcce into chigwell:main Oct 20, 2026
4 checks passed
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.

2 participants