Repository navigation
Use the stdlib json module instead of simplejson; bump to 1.3.0 - #22
Merged
Merged
Conversation
Coverage Report for CI Build 37524397957Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage remained the same at 91.322%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions10 previously-covered lines in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
iskandr
force-pushed
the
types-and-ci
branch
2 times, most recently
from
October 6, 2026 19:48
36e2dc4 to
a970445
Compare
simplejson was a Python 2 era backport of json (see #10). The stdlib encoder is faster and produces byte-identical output for everything serializable emits (checked against golden payloads, including numpy float64 / IntEnum / float-Enum values, -0.0, denormals, huge ints and non-ASCII strings). NaN handling is now explicit instead of depending on the installed simplejson version (>=3.19 rejects NaN by default, older versions accept it): - to_json raises ValueError for NaN/inf (allow_nan=False), matching simplejson>=3.19, so existing output and content hashes don't change. - from_json accepts NaN/Infinity, so files written with older simplejson versions can be read again. Drops the simplejson dependency. vaxrank imports simplejson without declaring it, so openvax/vaxrank#580 should be released first. Supersedes PR #10. Part of #15 (the typechecks and coveralls dependencies are left for a separate change). Claude-Session: https://claude.ai/code/session_01JRDMg3F5kNKmnjv5jvQBgr
This was referenced Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #21. vaxrank used to import
simplejsonwithout declaring it, getting it through this package. openvax/vaxrank#580 switched it to the stdlib, and that's released in vaxrank 3.38.2, so nothing in openvax still importssimplejson.Supersedes #10. Part of #15; the unused
typechecksandcoverallsdependencies are left for a separate change, since pyensembl and varcode importtypechecksthemselves.Changes
simplejsonwith the stdlibjsonmodule. Output is byte-identical:float64,IntEnum, floatEnum,strsubclasses,-0.0, denormals, huge ints, non-ASCII strings and lone surrogates.json.dumpstakes 6.5 ms vs 10.5 ms for simplejson on a 1.6 MB payload;loadstakes 7.1 ms vs 8.3 ms.to_jsonraisesValueErrorfor NaN/inf (allow_nan=False). That's what users with current simplejson get today, so existing output and vaxrank's content hashes don't change.from_jsonacceptsNaN/Infinity, so files written with simplejson < 3.19 load again.docs/index.md.simplejsondependency.https://claude.ai/code/session_01JRDMg3F5kNKmnjv5jvQBgr