Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch json to simplejson #167

Merged
merged 4 commits into from
Nov 20, 2024
Merged

Switch json to simplejson #167

merged 4 commits into from
Nov 20, 2024

Conversation

ayjayt
Copy link
Collaborator

@ayjayt ayjayt commented Nov 19, 2024

Python's standard json encoder doesn't support NaN values (nan, +- inf) json doesn't, simplejson does to an extent. (all get converted to null)

This will bring us back to our previous basic support for json, but I'd this route will likely help me fix some fill errors I was seeing in plotly earlier. Converted all NaN to null doesn't work and breaks fills when using jupyter- but it would be a change for pypi as well.

closes plotly/Kaleido#228

po2xel and others added 2 commits November 19, 2024 10:30
Support date/datetime object in NumpyEncoder.
Python's standard json encoder doesn't support NaN values (nan, +- inf)
json doesn't, simplejson does to an extent. (all get converted to null)
@ayjayt
Copy link
Collaborator Author

ayjayt commented Nov 19, 2024

I'd like to incorporate #166 into this issue

edit: done

@ayjayt
Copy link
Collaborator Author

ayjayt commented Nov 19, 2024

@gvwilson gvwilson added fix fixes something broken P2 needed for current cycle labels Nov 19, 2024
@ayjayt
Copy link
Collaborator Author

ayjayt commented Nov 20, 2024

There seems to be support for adding the orjson dependency which will have broader encoding support. This PR introduces our first external dependency, but I think it'll be very valuable.

Will do it today.

@ayjayt
Copy link
Collaborator Author

ayjayt commented Nov 20, 2024

@neyberson can you please look at changing json/simplejson to orjson in choreographer/pipe.py?

@gvwilson gvwilson changed the title Switch json to simplejson: Switch json to simplejson Nov 20, 2024
@gvwilson
Copy link
Contributor

want me to merge this?

@gvwilson gvwilson merged commit 9071bc7 into main Nov 20, 2024
4 checks passed
@gvwilson gvwilson deleted the andrew/simplejson branch November 20, 2024 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix fixes something broken P2 needed for current cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Static export fails for data with missing values
3 participants