Upgrading ujson 2 to 3
Breaking2.0.3 → 3.2.0Breaking3New1Changed3Fixed1Other1
BreakingUpgrade verdict
3 breaking changes.
In plain terms
- 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.
Must act 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.
What you must change
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_bytesAdds an allow_nan keyword argument to dumps, defaulting to True to align with the json library.
allow_nandumps