Skip to content

chore(release): prepare json-logging 1.6.0 - #132

Merged
suppagoddo merged 2 commits into
masterfrom
release/1.6.0
Oct 21, 2026
Merged

suppagoddo merged 2 commits into
masterfrom
release/1.6.0

Conversation

@suppagoddo

@suppagoddo suppagoddo commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

json-logging 1.6.0: release preparation

Prepares 1.6.0 (from 1.5.1). The branch is one commit on master ae87370 and changes only setup.py (version 1.5.1 → 1.6.0) and CHANGELOG.md.

Nothing has been published. No tag, GitHub Release, TestPyPI or PyPI upload. The only workflow (code_quality.yml) runs tests on pushes and pull requests to master; merging this PR does not publish anything.

What 1.6.0 contains (all merged)

PR Change Changelog section
#129 (fixes #98) optional json_logging.EXCLUDED_FIELDS Added
#123 (fixes #124) FastAPI request-context propagation (sync and async endpoints, background tasks, streaming, context-inheriting work) Fixed
#127 (fixes #125) Flask/Quart/Connexion: - outside requests instead of random IDs; Connexion 3 error handlers and middleware keep supplied headers Fixed
#128 (fixes #126) non-web get_correlation_id() returns - instead of raising Fixed
#133 Sanic 24+ logging config without format keys Fixed
#130 (fixes #106) FastAPI/Uvicorn startup and double-initialisation docs Documentation
#131 (fixes #25) Gunicorn + Flask example with real-worker tests Documentation

Changelog

## Unreleased (empty), then ## 1.6.0 with Added / Fixed / Documentation / Compatibility. Each PR and issue appears once.

The two old statements were replaced because they don't hold for the whole release: "other framework integrations and shared utilities are unchanged" and "no change to the JSON schema, field names or default output". Compatibility now says:

  • default fields are unchanged unless EXCLUDED_FIELDS is set;
  • which framework behaviours changed;
  • FastAPI's Python 3.9+ context path, with its thread, WebSocket and no-instrumentation limits;
  • CI covers Python 3.9–3.14; Python ≤3.8 and Python 2 are not tested.

There's no date in the heading. Following the existing ## X.Y.Z - YYYY-MM-DD convention, add it when the release is cut.

Package validation

Built from a git archive of ae3ca2b with python -m build (setuptools 84.2.1, isolated):

Artifact Size SHA-256
json_logging-1.6.0-py2.py3-none-any.whl 26,216 B ee3fe974079607dd819888556d2dc14ce782a3dc816f04de9d15ac93f635f1b5
json_logging-1.6.0.tar.gz 47,261 B 597d1acc0f9f1e4507c07db8b407cff2df943b03ef6889324cbc6f568008a309
  • twine check: PASSED for both. One warning, which also affected 1.5.1: long_description_content_type is missing.
  • Both artifacts report Name: json-logging, Version: 1.6.0.
  • The wheel contains only the json_logging package (13 modules) plus dist-info, with top_level.txt = json_logging. No tests or example packages, and no runtime dependencies.
  • Setuptools deprecation warnings (license classifier → SPDX expression; universal=1) are not new in this release; follow-up.

Clean installs. Fresh Python 3.13 virtual environments outside the repository, with nothing on PYTHONPATH. One installed the wheel, the other the sdist. Both report json-logging 1.6.0 loaded from site-packages, and each scenario ran in its own python -I interpreter:

Scenario Wheel sdist
A: non-web default: EXCLUDED_FIELDS == (), get_correlation_id() == "-", JSON with all standard fields PASS PASS
B: non-web with ["written_ts"]: field absent, written_at/msg/others kept PASS PASS
B2: invalid EXCLUDED_FIELDS → TypeError, corrected retry works, duplicate init still rejected PASS PASS
C: FastAPI sync and async with exclusion: header kept, one generated ID per request, app and request logs agree, written_ts absent, - afterwards PASS PASS
D: Flask, handler added before init: formatter installed automatically; - outside requests; header and generated IDs shared by app and request logs PASS PASS
E/F/G: Quart, Connexion 3, Sanic 25.12.1 initialise and behave as expected PASS PASS

Gunicorn with the installed wheel (the example copied out of the repo, configured with 2 workers, sync worker class):

  • 2 workers booted, and json-logging initialised once per worker (2 worker ready records, both -);
  • the supplied and generated IDs match between responses and request records;
  • 0 Gunicorn access lines;
  • master lines are plain text; Worker exiting is JSON with -.

Tests and CI

  • Locally:
    • Python 3.9/3.10/3.11/3.13: 94 passed (the Gunicorn module is skipped where gunicorn isn't installed).
    • Python 3.12: 94 passed plus the 3 Gunicorn tests. The Gunicorn tests pass when run directly against real Gunicorn 26.2.0. Under pytest in the reviewer's environment, Gunicorn's Unix-socket bind() is refused with EPERM.
    • Blocking flake8: 0.
  • GitHub Actions on ae3ca2b: 15/15. Unit tests on Python 3.9–3.14; Flask/Quart/FastAPI/Sanic smoke tests on 3.9 and 3.14; Flake8. Run: https://github.com/bobbui/json-logging-python/actions/runs/39531735116
    • CI installs gunicorn and sets CI=true, which makes the Gunicorn module fail instead of skip if gunicorn is missing.
    • The job logs could not be downloaded from the reviewer's environment.

Remaining before publication (maintainer)

  1. Merge this PR.
  2. Add the release date to ## 1.6.0.
  3. Tag 1.6.0 on the merged commit, and rebuild from the tag.
  4. twine check, then upload with the project's PyPI credentials.

Summary by CodeRabbit

  • New Features

    • Added support for excluding specified fields from processing.
    • Improved correlation-ID handling across FastAPI, Flask, Quart, Connexion, Sanic, and non-web contexts.
  • Bug Fixes

    • Improved compatibility with Sanic integrations.
  • Documentation

    • Added examples and clarified correlation-ID behavior and compatibility guidance.
  • Compatibility

    • Documented supported Python versions and compatibility rules.
    • Released as version 1.6.0.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 517081c2-78d8-4c83-b4f4-94a618fccbc5
📥 Commits

Reviewing files that changed from the base of the PR and between ae3ca2b and 9266d34.

📒 Files selected for processing: 1
  • setup.py
🚧 Files skipped from review as they are similar to previous changes: 1
  • setup.py

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

📝 Walkthrough

The package version changes from 1.5.1 to 1.6.0. The changelog adds categorized 1.6.0 release notes covering configuration, correlation-ID behavior, documentation examples, compatibility, and supported Python versions.

Changes: 1.6.0 Release

Layer / File(s) Summary
Package version and release notes
setup.py, CHANGELOG.md
setup.py sets the package version to 1.6.0 and adds maintainer metadata. The changelog documents EXCLUDED_FIELDS, correlation-ID behavior, framework compatibility, documentation examples, and supported Python versions.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other · Severity of issue fixed: Medium

Suggested reviewers: bobbui

Merge Risk: ⚪ Minimal · up to 9266d

No merge-blocking issue is established for the 1.6.0 release metadata; the release can proceed through its normal checks.

Architecture risk: 🔵 Low · up to ae3ca

The change affects 2 systems.

Changed systems: setup.py, CHANGELOG.md

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — setup.py (service) was modified; 1 changed file maps to changed impact.
  • observed — CHANGELOG.md (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in CHANGELOG.md: Added the 1.6.0 release heading and documented optional json_logging.EXCLUDED_FIELDS, including supported collection types, its empty default, initialization timing, validation errors, and non-redaction semantics.
  • observed — Modified behavior in CHANGELOG.md: Documented fixes for FastAPI request correlation propagation, outside-request correlation IDs in Flask/Quart/Connexion, safe non-web get_correlation_id() behavior, and Sanic 24.x formatter compatibility.
  • observed — Modified behavior in CHANGELOG.md: Added documentation entries for FastAPI/Uvicorn startup patterns and a tested Gunicorn/Flask integration example.
  • observed — Modified behavior in CHANGELOG.md: Added compatibility notes covering unchanged default output, framework-specific behavior changes, Python 3.9+ FastAPI context propagation, unsupported context-inheritance cases, and CI test-version coverage.
Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely identifies the release-preparation change for json-logging version 1.6.0. This matches the version update and changelog changes.
Linked Issues check Passed All directly linked issues are closed. They provide historical context only. No active linked issue imposes coding or test requirements on this PR. The PR changes package metadata and the 1.6.0 change…
Out of Scope Changes check Passed The whole-PR changes update setup.py from version 1.5.1 to 1.6.0, add maintainer metadata, and update CHANGELOG.md. These changes support the stated release preparation. No unrelated source, t…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Full details: Linked Issues check

Explanation

All directly linked issues are closed. They provide historical context only. No active linked issue imposes coding or test requirements on this PR. The PR changes package metadata and the 1.6.0 changelog.

Full details: Out of Scope Changes check

Explanation

The whole-PR changes update setup.py from version 1.5.1 to 1.6.0, add maintainer metadata, and update CHANGELOG.md. These changes support the stated release preparation. No unrelated source, test, dependency, or publication changes are present.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Bump the version to 1.6.0 and collect the changelog into a 1.6.0 section
covering every change merged since 1.5.1:

- Added: json_logging.EXCLUDED_FIELDS (#129, fixes #98)
- Fixed: FastAPI request-context propagation (#123, fixes #124); outside-request
  correlation IDs in Flask, Quart and Connexion (#127, fixes #125); non-web
  get_correlation_id() (#128, fixes #126); Sanic 24+ logging config (#133)
- Documentation: FastAPI/Uvicorn startup (#130, fixes #106); Gunicorn and
  Flask example (#131, fixes #25)
- Compatibility: default output unchanged unless EXCLUDED_FIELDS is set; the
  framework behaviour changes; Python 3.9+ FastAPI context path; CI coverage

The previous 'other integrations unchanged' and 'no change to the JSON schema'
statements are replaced, since they do not hold for the whole release. The
date is added when the release is cut. No library code change.
@suppagoddo
suppagoddo merged commit bba627f into master Oct 21, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment