-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ENH: Enabling parsing ulonglong from json #44770
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
ENH: Enabling parsing ulonglong from json #44770
Conversation
deponovo
commented
Dec 5, 2021
•
edited
Loading
edited
- closes read_json: ValueError: Value is too big #26068
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
cc @WillAyd |
I think ujson added this upstream. See @deponovo I think better to just copy what they've already done down rather than have a new implementation |
No idea it was based on an external lib. That commit is even from 2014. I'll replace my implementation by the commit you mentioned. |
@WillAyd Pushed mods according to the requests. Now that I notice that pandas' ujson is based on an external lib, one might even consider updating the whole local code with the latest stable version of ujson. |
@WillAyd I just tested replacing the whole ujson base code with the latest version. The tests have the same result as per this PR. Should we instead perform that upgrade? I would only push after a positive answer. |
I think we have some extensions in our code base that would be lost with a blanket update. If you wanted to do that its probably worth a dedicated issue and providing an analysis of the diff to see what might be changing. For the scope of this PR, I think you are getting build failures from the definitions of DECLARE_NAN and DECLARE_INF that aren't being used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking reasonable. I think the failing test needs to be updated
I am confused to how I should add an entry here. Should I had my text on v1.4.0? Not sure I fully understand the (reference)[https://pandas.pydata.org/pandas-docs/stable/development/contributing_codebase.html#documenting-your-code] help. |
Yea 1.4 looks right. Should be good in the “Other Enhancements” section https://github.com/pandas-dev/pandas/blob/master/doc/source/whatsnew/v1.4.0.rst#other-enhancements |
thanks @deponovo very nice! would certainly take an update to the ujson vendored code. |
@deponovo any interest in porting more more improvements from upstream? in particular in ultrajsondec.c is looks like some overflow-handling improvements have been made. |
@jbrockmendel @jreback I already started with it. But there are some pandas specific code injections, so I can just swap code blindfolded. For now time is lacking. But I am working on it. |