Skip to content

Upgrading ujson 2 to 3

Breaking2.0.3 → 3.2.0Breaking3New1Changed3Fixed1Other1

BreakingUpgrade verdict

3 breaking changes.

  • Python 2.7 is no longer supported; use Python 3.
  • By default, passing bytes to the parser now raises an error, matching the standard json module.
  • Serializing NaN and Infinity values is now controlled by an allow_nan option, on by default like the standard json module.
3 items need code or config changes

Python requirement changed in 3.0.0: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* → >=3.5.

Breaking3
Drops support for end-of-life Python 2.7.
Adds a reject_bytes option that raises on bytes input, defaulting to True to align with the json library.
reject_bytes
Adds an allow_nan keyword argument to dumps, defaulting to True to align with the json library.
allow_nandumps