---
title: "python-json-logger 4.2.0 Breaking Changes on PyPI"
description: "What each python-json-logger release removed, renamed or changed: 53 breaking changes in 10 versions on PyPI, each with its source."
canonical_url: https://since.dev/packages/pypi/python-json-logger
last_updated: 2026-12-04
---

# python-json-logger breaking changes

python-json-logger 4.2.0 (August 15, 2026) is its newest release with breaking changes. The first: Logging a dict no longer modifies the caller's dict in python-json-logger 4.2.0. Every breaking API change we have recorded in python-json-logger on PyPI: 53 breaking changes in 10 versions. Below, its 10 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `4.2.0`, released August 15, 2026. [Source repository](https://github.com/nhairs/python-json-logger)

Its 4.1.0 release drops Python 3.8 and [3.9](https://since.dev/calendar/python/3.9.md). [Python end of life dates](https://since.dev/calendar/python.md).

- From [3.3.0](#v-3-3-0) to [4.2.0](#v-4-2-0): 31 breaking changes in 3 versions.
- From [2.0.0](#v-2-0-0) to [4.2.0](#v-4-2-0): 52 breaking changes in 9 versions.

## python-json-logger 4.2.0 breaking changes

python-json-logger 4.2.0, released August 15, 2026: 1 breaking change.

- **Behavior changed**  

Logging a dict no longer adds exc_info and stack_info to the caller's dict. Code that relied on those keys being added to the dict must read them from the log record instead. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v4.2.0)

## python-json-logger 4.1.0 breaking changes

python-json-logger 4.1.0, released March 29, 2026: 2 breaking changes.

- **Removed**  

Release 4.1.0 removes support for Python 3.8 and 3.9, including their PyPy versions. Users on those Python versions must upgrade Python before updating the package. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v4.1.0)
- **Signature changed** `pythonjsonlogger.core.merge_record_extra`  

Was def merge_record_extra(record: logging.LogRecord, target: Dict, reserved: Container\[str\], rename_fields: Optional\[Dict\[str, str\]\] = None) -> Dict; now def merge_record_extra(record: logging.LogRecord, target: dict\[Any, Any\], reserved... [pypi.org](https://pypi.org/project/python-json-logger/4.1.0/)

## python-json-logger 4.0.0 breaking changes

python-json-logger 4.0.0, released October 6, 2025: 28 breaking changes.

- **Removed** `pythonjsonlogger.core.LogRecord`  

The class pythonjsonlogger.core.LogRecord was renamed to avoid overlap with logging.LogRecord. Update any code that imports or references the old name. [pypi.org](https://pypi.org/project/python-json-logger/4.0.0/)
- **Removed** `pythonjsonlogger.core.OptionalCallableOrStr`  

pythonjsonlogger.core.OptionalCallableOrStr was removed in python-json-logger 4.0.0 [pypi.org](https://pypi.org/project/python-json-logger/4.0.0/)
- **Removed** `pythonjsonlogger.core.str_to_object`  

pythonjsonlogger.core.str_to_object was removed in python-json-logger 4.0.0 [pypi.org](https://pypi.org/project/python-json-logger/4.0.0/)
- **Removed** `pythonjsonlogger.json.JsonFormatter.json_default`  

Formatters no longer accept strings instead of objects. Use the DictConfigurator ext:// prefix format with fileConfig or dictConfig. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v4.0.0)
- **Removed** `pythonjsonlogger.json.JsonFormatter.json_encoder`  

Formatters no longer accept strings instead of objects. Use the DictConfigurator ext:// prefix format with fileConfig or dictConfig. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v4.0.0)
- **Removed** `pythonjsonlogger.json.JsonFormatter.json_serializer`  

Formatters no longer accept strings instead of objects. Use the DictConfigurator ext:// prefix format with fileConfig or dictConfig. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v4.0.0)
- **Removed** `pythonjsonlogger.msgspec.MsgspecFormatter.json_default`  

Formatters no longer accept strings instead of objects. Use the DictConfigurator ext:// prefix format with fileConfig or dictConfig. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v4.0.0)
- **Removed** `pythonjsonlogger.orjson.OrjsonFormatter.json_default`  

Formatters no longer accept strings instead of objects. Use the DictConfigurator ext:// prefix format with fileConfig or dictConfig. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v4.0.0)
- **Signature changed** `add_fields`  

The log_record argument of pythonjsonlogger.core.BaseJsonFormatter subclasses was renamed. Update any calls that pass it by keyword. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v4.0.0)
- **Signature changed** `jsonify_log_record`  

The log_record argument of pythonjsonlogger.core.BaseJsonFormatter subclasses was renamed. Update any calls that pass it by keyword. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v4.0.0)

And 18 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## python-json-logger 3.3.0 breaking changes

python-json-logger 3.3.0, released March 7, 2025: 2 breaking changes.

- **Removed** `msgspec-python313-pre`  

The msgspec-python313-pre package was removed from the dev dependencies to prevent a potential remote code execution risk; it is not a runtime dependency for users of the package. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v3.3.0)
- **Signature changed** `pythonjsonlogger.core.BaseJsonFormatter.__init__`  

Was def \_\_init\_\_(self, fmt: Optional\[str\] = None, datefmt: Optional\[str\] = None, style: str = '%', validate: bool = True, \*, prefix: str = '', rename_fields: Optional\[Dict\[str, str\]\] = None, rename_fields_keep_missing: bool = False... [pypi.org](https://pypi.org/project/python-json-logger/3.3.0/)

## python-json-logger 3.2.1 breaking changes

python-json-logger 3.2.1, released December 16, 2024: 1 breaking change.

- **Removed** `pythonjsonlogger.pythonjsonlogger`  

pythonjsonlogger.pythonjsonlogger was removed in python-json-logger 3.2.1 [pypi.org](https://pypi.org/project/python-json-logger/3.2.1/)

## python-json-logger 3.2.0 breaking changes

python-json-logger 3.2.0, released December 12, 2024: 4 breaking changes.

- **Behavior changed** `defaults`  

Keys set in the defaults dictionary are now added to records when they are missing or not passed via extra. Log output that previously omitted these keys will now include them. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v3.2.0)
- **Behavior changed** `pythonjsonlogger.[orjson,msgspec]`  

When the required library is not installed, these modules now raise MissingPackageError instead of a plain import error. It still subclasses ImportError, but code matching the exact exception type must be updated. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v3.2.0)
- **Behavior changed** `pythonjsonlogger.[ORJSON,MSGSPEC]_AVAILABLE`  

Checking the availability flags no longer imports the respective package. Code that relied on that import side effect must import the package itself. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v3.2.0)
- **Configuration changed**  

The typing_extensions dependency is no longer installed on Python 3.10 and later. Code that imports it on those versions must declare it as its own dependency. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v3.2.0)

## Older versions

4 older versions, each with its first changes. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

### python-json-logger 3.1.0 breaking changes

python-json-logger 3.1.0, released December 12, 2024: 6 breaking changes.

- **Removed**  

The package no longer supports Python 3.7. Stay on 3.0.1 or upgrade Python. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v3.1.0)
- **Removed** `pythonjsonlogger.jsonlogger.JsonFormatter._str_to_fn`  

\_str_to_fn is replaced by pythonjsonlogger.core.str_to_object. Update any code calling the old private method. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v3.1.0)

And 4 more in this version.

### python-json-logger 3.0.1 breaking changes

python-json-logger 3.0.1, released December 12, 2024: 2 breaking changes.

- **Renamed** `json_serialiser`  

The json_serialiser parameter was renamed to json_serializer. Code that passes json_serialiser by keyword must be updated to use json_serializer. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v3.0.1)
- **Signature changed** `pythonjsonlogger.jsonlogger.JsonFormatter.__init__`  

Was def \_\_init\_\_(self, \*args: Any, json_default: OptionalCallableOrStr = None, json_encoder: OptionalCallableOrStr = None, json_serialiser: Union\[Callable, str\] = json.dumps, json_indent: Optional\[Union\[int, str\]\] = None... [pypi.org](https://pypi.org/project/python-json-logger/3.0.1/)

### python-json-logger 3.0.0 breaking changes

python-json-logger 3.0.0, released December 12, 2024: 6 breaking changes.

- **Removed**  

Python 3.6 is no longer supported. Supported versions are CPython 3.7-3.12 and PyPy 3.7-3.10, so code must run on one of these. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v3.0.0)
- **Behavior changed** `RESERVED_ATTRS`  

RESERVED_ATTRS is now a list whose contents vary by Python version. Code that relies on its previous type or contents must be updated. [github.com](https://github.com/nhairs/python-json-logger/releases/tag/v3.0.0)

And 4 more in this version.

### python-json-logger 2.0.0 breaking changes

python-json-logger 2.0.0, released September 26, 2020: 1 breaking change.

- **Removed**  

The release no longer supports Python 2.7, so code running on it must stay on an older version of the package or move to a newer Python. [github.com](https://github.com/nhairs/python-json-logger/blob/v2.0.0/CHANGELOG.md)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
