chore(deps): update dependency python-json-logger to v4 #36

Open
renovate wants to merge 1 commit from renovate/python-json-logger-4.x into main
Member

This PR contains the following updates:

Package Change Age Confidence
python-json-logger ^2.0.7 → ^4.0.0 age confidence

Release Notes

nhairs/python-json-logger (python-json-logger)

v4.2.0: 4.2.0

Compare Source

Changed
  • Logging a dict no longer modifies it. exc_info and stack_info were previously added to the caller's dict. #​66
  • Move development dependencies from project.optional-dependencies.dev to [dependency-groups].dev (PEP 735). #​46
Fixed
  • $ style formats now support unbraced $name fields, not just ${name}. #​18

Thanks @​gaoflow, @​prateek-dagar, @​Sanjays2402

v4.1.0: 4.1.0

Compare Source

Added
  • Add support for Python 3.14, PyPy 3.11
Removed
  • Remove support for Python 3.8, 3.9 (includes PyPy versions).

v4.0.0: 4.0.0

Compare Source

Added
  • Support DictConfigurator prefixes for rename_fields and static_fields. #​45
    • Allows using values like ext://sys.stderr in fileConfig/dictConfig value fields.
  • Support comma seperated lists for Formatter fmt (style=",") e.g. "asctime,message,levelname" #​15
    • Note that this style is specific to python-json-logger and thus care should be taken not to pass this format to other logging Formatter implementations.
  • Supports sequences of strings (e.g. lists and tuples) of field names for Formatter fmt. #​16
Changed
  • Rename pythonjsonlogger.core.LogRecord and log_record arguments to avoid confusion / overlapping with logging.LogRecord. #​38
    • Affects arguments to pythonjsonlogger.core.BaseJsonFormatter (and any child classes).
      • serialize_log_record
      • add_fields
      • jsonify_log_record
      • process_log_record
    • Note: functions referring to log_record have not had their function name changed.
Removed
  • Remove support for providing strings instead of objects when instantiating formatters. Instead use the DictConfigurator ext:// prefix format when using fileConfig/dictConfig. #​47
    • Affects pythonjsonlogger.json.JsonFormatter: json_default, json_encoder, json_serializer.
    • Affects pythonjsonlogger.orjson.OrjsonFormatter: json_default.
    • Affects pythonjsonlogger.msgspec.MsgspecFormatter: json_default.

Thanks @​rubensa

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: https://github.com/nhairs/python-json-logger/compare/v2.0.7...v3.0.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • 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 this update again.


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

This PR has been generated by Mend Renovate.

This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [python-json-logger](https://github.com/nhairs/python-json-logger) | `^2.0.7` → `^4.0.0` | ![age](https://developer.mend.io/api/mc/badges/age/pypi/python-json-logger/4.2.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/python-json-logger/2.0.7/4.2.0?slim=true) | --- ### Release Notes <details> <summary>nhairs/python-json-logger (python-json-logger)</summary> ### [`v4.2.0`](https://github.com/nhairs/python-json-logger/releases/tag/v4.2.0): 4.2.0 [Compare Source](https://github.com/nhairs/python-json-logger/compare/v4.1.0...v4.2.0) ##### Changed - Logging a `dict` no longer modifies it. `exc_info` and `stack_info` were previously added to the caller's `dict`. [#&#8203;66](https://github.com/nhairs/python-json-logger/pull/66) - Move development dependencies from `project.optional-dependencies.dev` to `[dependency-groups].dev` (PEP 735). [#&#8203;46](https://github.com/nhairs/python-json-logger/issues/46) ##### Fixed - `$` style formats now support unbraced `$name` fields, not just `${name}`. [#&#8203;18](https://github.com/nhairs/python-json-logger/issues/18) Thanks [@&#8203;gaoflow](https://github.com/gaoflow), [@&#8203;prateek-dagar](https://github.com/prateek-dagar), [@&#8203;Sanjays2402](https://github.com/Sanjays2402) ### [`v4.1.0`](https://github.com/nhairs/python-json-logger/releases/tag/v4.1.0): 4.1.0 [Compare Source](https://github.com/nhairs/python-json-logger/compare/v4.0.0...v4.1.0) ##### Added - Add support for Python 3.14, PyPy 3.11 ##### Removed - Remove support for Python 3.8, 3.9 (includes PyPy versions). ### [`v4.0.0`](https://github.com/nhairs/python-json-logger/releases/tag/v4.0.0): 4.0.0 [Compare Source](https://github.com/nhairs/python-json-logger/compare/v3.3.0...v4.0.0) ##### Added - Support `DictConfigurator` prefixes for `rename_fields` and `static_fields`. [#&#8203;45](https://github.com/nhairs/python-json-logger/pull/45) - Allows using values like `ext://sys.stderr` in `fileConfig`/`dictConfig` value fields. - Support comma seperated lists for Formatter `fmt` (`style=","`) e.g. `"asctime,message,levelname"` [#&#8203;15](https://github.com/nhairs/python-json-logger/issues/15) - Note that this style is specific to `python-json-logger` and thus care should be taken not to pass this format to other logging Formatter implementations. - Supports sequences of strings (e.g. lists and tuples) of field names for Formatter `fmt`. [#&#8203;16](https://github.com/nhairs/python-json-logger/issues/16) ##### Changed - Rename `pythonjsonlogger.core.LogRecord` and `log_record` arguments to avoid confusion / overlapping with `logging.LogRecord`. [#&#8203;38](https://github.com/nhairs/python-json-logger/issues/38) - Affects arguments to `pythonjsonlogger.core.BaseJsonFormatter` (and any child classes). - `serialize_log_record` - `add_fields` - `jsonify_log_record` - `process_log_record` - Note: functions referring to `log_record` have **not** had their function name changed. ##### Removed - Remove support for providing strings instead of objects when instantiating formatters. Instead use the `DictConfigurator` `ext://` prefix format when using `fileConfig`/`dictConfig`. [#&#8203;47](https://github.com/nhairs/python-json-logger/issues/47) - Affects `pythonjsonlogger.json.JsonFormatter`: `json_default`, `json_encoder`, `json_serializer`. - Affects `pythonjsonlogger.orjson.OrjsonFormatter`: `json_default`. - Affects `pythonjsonlogger.msgspec.MsgspecFormatter`: `json_default`. Thanks [@&#8203;rubensa](https://github.com/rubensa) ### [`v3.3.0`](https://github.com/nhairs/python-json-logger/releases/tag/v3.3.0): 3.3.0 [Compare Source](https://github.com/nhairs/python-json-logger/compare/v3.2.1...v3.3.0) ##### 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. [#&#8203;35](https://github.com/nhairs/python-json-logger/issues/35) ##### Security - Remove `msgspec-python313-pre` from `dev` dependencies preventing potential RCE. Details: [GHSA-wmxh-pxcx-9w24](https://github.com/nhairs/python-json-logger/security/advisories/GHSA-wmxh-pxcx-9w24#advisory-comment-121307) Thanks [@&#8203;1hakusai1](https://github.com/1hakusai1) and [@&#8203;omnigodz](https://github.com/omnigodz) ### [`v3.2.1`](https://github.com/nhairs/python-json-logger/releases/tag/v3.2.1): 3.2.1 [Compare Source](https://github.com/nhairs/python-json-logger/compare/v3.2.0...v3.2.1) ##### Fixed - Import error on `import pythonjsonlogger.jsonlogger` [#&#8203;29](https://github.com/nhairs/python-json-logger/issues/29) ### [`v3.2.0`](https://github.com/nhairs/python-json-logger/releases/tag/v3.2.0): 3.2.0 [Compare Source](https://github.com/nhairs/python-json-logger/compare/v3.1.0...v3.2.0) ##### 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 [@&#8203;cjwatson](https://github.com/cjwatson) and [@&#8203;bharel](https://github.com/bharel) ### [`v3.1.0`](https://github.com/nhairs/python-json-logger/releases/tag/v3.1.0) [Compare Source](https://github.com/nhairs/python-json-logger/compare/v3.0.1...v3.1.0) 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](https://github.com/jcrist/msgspec/issues/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 ([#&#8203;7](https://github.com/nhairs/python-json-logger/issues/7)) and ignores missing fields ([#&#8203;6](https://github.com/nhairs/python-json-logger/issues/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`](https://github.com/nhairs/python-json-logger/releases/tag/v3.0.1) [Compare Source](https://github.com/nhairs/python-json-logger/compare/v3.0.0...v3.0.1) ##### Fixes - Fix spelling of parameter `json_serialiser` -> `json_serializer` ([#&#8203;8](https://github.com/nhairs/python-json-logger/issues/8)) - [@&#8203;juliangilbey](https://github.com/juliangilbey) ### [`v3.0.0`](https://github.com/nhairs/python-json-logger/releases/tag/v3.0.0) [Compare Source](https://github.com/nhairs/python-json-logger/compare/v2.0.7...v3.0.0) Note: using new major version to separate changes from this fork and the original (upstream). See [#&#8203;1](https://github.com/nhairs/python-json-logger/issues/1) for details. ##### Changes - Update supported Python versions - [@&#8203;nhairs](https://github.com/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`) - [@&#8203;nhairs](https://github.com/nhairs) - Moved to `pyproject.toml` - [@&#8203;nhairs](https://github.com/nhairs) - Update linting and testing - [@&#8203;nhairs](https://github.com/nhairs) - Split lint and test steps in GHA - Use validate-pyproject, black, pylint, mypy #### New Contributors **Full Changelog**: <https://github.com/nhairs/python-json-logger/compare/v2.0.7...v3.0.0> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - 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 this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yODguMCIsInVwZGF0ZWRJblZlciI6IjQzLjI4OC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
chore(deps): update dependency python-json-logger to v4
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
8810c3f9b0
renovate force-pushed renovate/python-json-logger-4.x from 8810c3f9b0
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
to f0d4f9fdf7
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
2026-11-04 22:57:22 +00:00
Compare
renovate force-pushed renovate/python-json-logger-4.x from f0d4f9fdf7
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
to 58b6c1f70b
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
2026-11-05 07:59:12 +00:00
Compare
renovate force-pushed renovate/python-json-logger-4.x from 58b6c1f70b
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
to 68d520bed8
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
2026-11-05 08:58:59 +00:00
Compare
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin renovate/python-json-logger-4.x:renovate/python-json-logger-4.x
git switch renovate/python-json-logger-4.x

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff renovate/python-json-logger-4.x
git switch renovate/python-json-logger-4.x
git rebase main
git switch main
git merge --ff-only renovate/python-json-logger-4.x
git switch renovate/python-json-logger-4.x
git rebase main
git switch main
git merge --no-ff renovate/python-json-logger-4.x
git switch main
git merge --squash renovate/python-json-logger-4.x
git switch main
git merge --ff-only renovate/python-json-logger-4.x
git switch main
git merge renovate/python-json-logger-4.x
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sr2/snapdirect!36
No description provided.