Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Feb 13, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
python_json_logger ~=2.0.4 -> ~=3.3.0 age adoption passing confidence

Release Notes

nhairs/python-json-logger (python_json_logger)

v3.3.0: 3.3.0

Compare Source

Added
  • exc_info_as_array and stack_info_as_array options are added to pythonjsonlogger.core.BaseJsonFormatter allowing both to be encoded as list of lines instead of a single multi-line string. #​35
Security
  • Remove msgspec-python313-pre from dev dependencies preventing potential RCE. Details: GHSA-wmxh-pxcx-9w24

Thanks @​1hakusai1 and @​omnigodz

v3.2.1: 3.2.1

Compare Source

Fixed
  • Import error on import pythonjsonlogger.jsonlogger #​29

v3.2.0: 3.2.0

Compare Source

Changed
  • pythonjsonlogger.[ORJSON,MSGSPEC]_AVAILABLE no longer imports the respective package when determining availability.
  • pythonjsonlogger.[orjson,msgspec] now throws a pythonjsonlogger.exception.MissingPackageError when required libraries are not available. These contain more information about what is missing whilst still being an ImportError.
  • defaults parameter is no longer ignored and now conforms to the standard library. Setting a defaults dictionary will add the specified keys if the those keys do not exist in a record or weren't passed by the extra parameter when logging a message.
  • typing_extensions is only installed on Python version < 3.10.
  • Support Python 3.13
    • msgspec has only been tested against pre-release versions.

Thanks @​cjwatson and @​bharel

v3.1.0

Compare Source

This splits common funcitonality out to allow supporting other JSON encoders. Although this is a large refactor, backwards compatibility has been maintained.

Added
  • pythonjsonlogger.core - more details below.
  • pythonjsonlogger.defaults module that provides many functions for handling unsupported types.
  • Orjson encoder support via pythonjsonlogger.orjson.OrjsonFormatter with the following additions:
    • bytes are URL safe base64 encoded.
    • Exceptions are "pretty printed" using the exception name and message e.g. "ValueError: bad value passed"
    • Enum values use their value, Enum classes now return all values as a list.
    • Tracebacks are supported
    • Classes (aka types) are support
    • Will fallback on __str__ if available, else __repr__ if available, else will use __could_not_encode__
  • MsgSpec encoder support via pythonjsonlogger.msgspec.MsgspecFormatter with the following additions:
    • Exceptions are "pretty printed" using the exception name and message e.g. "ValueError: bad value passed"
    • Enum classes now return all values as a list.
    • Tracebacks are supported
    • Classes (aka types) are support
    • Will fallback on __str__ if available, else __repr__ if available, else will use __could_not_encode__
    • Note: msgspec only supprts enum values of type int or str jcrist/msgspec#680
Changed
  • pythonjsonlogger.jsonlogger has been moved to pythonjsonlogger.json with core functionality moved to pythonjsonlogger.core.
  • pythonjsonlogger.core.BaseJsonFormatter properly supports all logging.Formatter arguments:
    • fmt is unchanged.
    • datefmt is unchanged.
    • style can now support non-standard arguments by setting validate to False
    • validate allows non-standard style arguments or prevents calling validate on standard style arguments.
    • default is ignored.
  • pythonjsonlogger.json.JsonFormatter default encodings changed:
    • bytes are URL safe base64 encoded.
    • Exception formatting detected using BaseException instead of Exception. Now "pretty prints" the exception using the exception name and message e.g. "ValueError: bad value passed"
    • Dataclasses are now supported
    • Enum values now use their value, Enum classes now return all values as a list.
    • Will fallback on __str__ if available, else __repr__ if available, else will use __could_not_encode__
  • Renaming fields now preserves order (#​7) and ignores missing fields (#​6).
  • Documentation
    • Generated documentation using mkdocs is stored in docs/
    • Documentation within README.md has been moved to docs/index.md and docs/qucikstart.md.
    • CHANGELOG.md has been moved to docs/change-log.md
    • SECURITY.md has been moved and replaced with a symbolic link to docs/security.md.
Deprecated
  • pythonjsonlogger.jsonlogger is now pythonjsonlogger.json
  • pythonjsonlogger.jsonlogger.RESERVED_ATTRS is now pythonjsonlogger.core.RESERVED_ATTRS.
  • pythonjsonlogger.jsonlogger.merge_record_extra is now pythonjsonlogger.core.merge_record_extra.
Removed
  • Python 3.7 support dropped
  • pythonjsonlogger.jsonlogger.JsonFormatter._str_to_fn replaced with pythonjsonlogger.core.str_to_object.

v3.0.1

Compare Source

Fixes

v3.0.0

Compare Source

Note: using new major version to separate changes from this fork and the original (upstream). See #​1 for details.

Changes
  • Update supported Python versions - @​nhairs
    • Drop 3.6
    • The following versions are supported and tested:
      • CPython 3.7-3.12 (ubuntu, windows, mac)
      • PyPy 3.7-3.10 (ubuntu, wundows, mac)
    • RESERVED_ATTRS is now a list and version dependent
  • Fix JsonFormatter.__init__ return type (None) - @​nhairs
  • Moved to pyproject.toml - @​nhairs
  • Update linting and testing - @​nhairs
    • Split lint and test steps in GHA
    • Use validate-pyproject, black, pylint, mypy

New Contributors

Full Changelog: nhairs/python-json-logger@v2.0.7...v3.0.0


Configuration

📅 Schedule: Branch creation - "after 10pm every weekday,every weekend,before 5am every weekday" in timezone Europe/Paris, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added dependencies use for pull requests that update a dependency file filigran team use to identify PR from the Filigran team labels Feb 13, 2025
@renovate renovate bot force-pushed the renovate/python_json_logger-3.x branch from 5609788 to 0ca1d2c Compare March 8, 2025 01:06
@renovate renovate bot force-pushed the renovate/python_json_logger-3.x branch from 0ca1d2c to 57309e0 Compare March 17, 2025 21:04
@renovate renovate bot force-pushed the renovate/python_json_logger-3.x branch 3 times, most recently from c59af8c to 1543d9d Compare April 12, 2025 19:30
@renovate renovate bot force-pushed the renovate/python_json_logger-3.x branch from 1543d9d to e9df73b Compare April 12, 2025 21:27
@SamuelHassine SamuelHassine merged commit 6705eef into master Apr 12, 2025
7 checks passed
@SamuelHassine SamuelHassine deleted the renovate/python_json_logger-3.x branch April 12, 2025 21:59
aHenryJard pushed a commit to OpenCTI-Platform/opencti that referenced this pull request Nov 12, 2025
…ython#836)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

(original commit: OpenCTI-Platform/client-python@6705eef)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

dependencies use for pull requests that update a dependency file filigran team use to identify PR from the Filigran team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants