Skip to content

Ujson update#2

Open
WilliamBinquet wants to merge 772 commits into
masterfrom
ujson-update
Open

Ujson update#2
WilliamBinquet wants to merge 772 commits into
masterfrom
ujson-update

Conversation

@WilliamBinquet

Copy link
Copy Markdown

No description provided.

hugovk and others added 30 commits June 19, 2022 00:22
…ints

Add support for arbitrary size integers
This fixes character handling on platforms with 16-bit wchar_t (notably, Windows), which was broken (in different ways) on both CPython and PyPy.

Fixes ultrajson#552
Fix double free on string decoding if realloc fails
updates:
- [github.com/asottile/pyupgrade: v2.31.1 → v2.34.0](asottile/pyupgrade@v2.31.1...v2.34.0)
- [github.com/psf/black: 22.3.0 → 22.6.0](psf/black@22.3.0...22.6.0)
- [github.com/pre-commit/pre-commit-hooks: v4.1.0 → v4.3.0](pre-commit/pre-commit-hooks@v4.1.0...v4.3.0)
…config

[pre-commit.ci] pre-commit autoupdate
There are small typos in:
- python/objToJSON.c
- tests/test_ujson.py

Fixes:
- Should read `standard` rather than `stanard`.
- Should read `gibberish` rather than `jibberish`.

Signed-off-by: Tim Gates <[email protected]>
Infinity was being encoded as 'Inf' which, whilst the JSON spec doesn't include
any non-finite floats, differs from the conventions in other JSON libraries,
JavaScript of using 'Infinity'. It also differs from what `ujson.loads()`
expects so that `ujson.loads(ujson.dumps(math.inf))` raises an exception.

Closes ultrajson#80.
updates:
- [github.com/asottile/pyupgrade: v2.34.0 → v2.38.2](asottile/pyupgrade@v2.34.0...v2.38.2)
- [github.com/psf/black: 22.6.0 → 22.8.0](psf/black@22.6.0...22.8.0)
- [github.com/PyCQA/flake8: 4.0.1 → 5.0.4](PyCQA/flake8@4.0.1...5.0.4)
hugovk and others added 28 commits April 6, 2026 21:36
Improves unit test coverage without any code changes. This should help
identify any breaking behavior for future PRs.
* Add missing dec-refs for if PyTuple_Pack() or writing the payload to
  file fails

* Add missing bailout for failed PyTuple_Pack()

* Add tests for all but the PyTuple_Pack() failing (which requires
  inducing a malloc() failure)
Only needed if the current ujson fork is private.
There's some graalpy + virtalenv issue inside cibuildwheel and it
doesn't look like we can do anything about it.
Given that it's impossible to even describe what serialising a
concurrently mutating object is supposed to do, this is as far as I
think is useful or feasible to go towards supporting it (ultrajson#684/ultrajson#689).
Increasing the bug/CVE surface to include allowing any object to
metamorph in any way at any time is really not what this code base
needs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.