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.
Motivation
As mentioned in zauberzeug/rosys#301 (comment), NiceGUI does not work under PyPy normally. I discovered the reason (at least one of it) being orjson, as "orjson does not and will not support PyPy" (https://github.com/ijl/orjson/blob/aa8c946cfbe2aba29016bc9c9ddc8713cb00173b/README.md?plain=1#L35)
It would be a pity if we can't use NiceGUI under PyPy since its garbage collector does not "stop the world" unlike CPython's, an awesome use case for the robots which RoSys may empower
Implementation
Add
platform_python_implementation != 'PyPy'
to the markers of orjson marking it out of 32-bit systems, such that if it is PyPy orjson will not be installed.This is inspired from https://github.com/pyca/cryptography/blob/cac6426aafd989e4d8d9c4f6b920a332a5280bba/pyproject.toml#L8
Progress
nicegui/tests/test_json.py
Lines 13 to 20 in a6354dc