Skip to content

Upgrading simplejson 2 to 3

Breaking2.6.2 → 3.20.2Breaking2Security2Platform3New1Changed7Fixed13Other20

BreakingUpgrade verdict

2 breaking changes and 3 platform requirement changes and 2 security fixes.

  • Removes unused namedtuple_as_object and tuple_as_array arguments from simplejson.load (SJ-PT-23-102).
  • By default NaN and Infinity values are no longer accepted or produced; pass allow_nan=True to restore the old behavior.
  • This release is tested and built for Python 3.13, and no longer provides prebuilt macOS packages for Python 2.7.
  • The package now officially supports Python 3.11 and ships prebuilt wheels for it.
Top 5 of 7 that need code or config changes

Requires Python !=3.0.*,!=3.1.*,!=3.2.*,>=2.5 from 3.19.3 (none stated before).

Breaking2
Removes unused namedtuple_as_object and tuple_as_array arguments from simplejson.load (SJ-PT-23-102).
simplejson.loadnamedtuple_as_objecttuple_as_array
Changes default of allow_nan from True to False and adds allow_nan to decoder (SJ-PT-23-107).
allow_nan
Security2
Adds security hardening from an OSTIF-sponsored X41 D-Sec audit, making simplejson consume and produce only compliant JSON by default while keeping flags for backwards compatibility.
Backports the integer string length limitation from Python 3.11 to limit quadratic number parsing (SJ-PT-23-03).
Platform3
Adds Python 3.13 to the test and build matrix and drops wheel support for Python 2.7 on macOS.
Declares support for Python 3.11 and adds wheels.
Declares support for Python 3.10 and adds wheels.