Comments (10)
Thanks to the help of the awesome @althonos in PyO3/pyo3#185, I managed to finally add bytes
support. With that, we now have 130 successful and 31 skipped tests and the build is passing for the first time. Needless to say, this makes me very happy. 😆 🎉
Closing this.
from hyperjson.
See #6
from hyperjson.
Four tests are failing because it doesn't find JSONDecodeError
. I tried to fix that, but to no avail.
Seems like I don't understand how exceptions get defined. 😅
Opened an issue here: PyO3/pyo3#171
from hyperjson.
Multiple test cases are failing because serde_json::to_string
output a compact result, while the std json output a extra space between key and value.
from hyperjson.
@wdv4758h, good point.
I'm not sure whether we should treat that as a bug or an implementation detail. After all, JSON is a whitespace-agnostic format, so technically it should not make a difference. It might also cost us some performance to fix that in hyperjson and it doesn't seem like there will be an upstream change any time soon (see e.g. serde-rs/json#393).
So I suggest to keep that for a while and fix the affected unit tests by ignoring whitespace like so https://github.com/mre/hyperjson/blob/master/tests/test_dumps.py#L34. Sounds good?
from hyperjson.
So we are down to four failing unit tests after fixing issues with JSONDecodeError
. 🎉
The remaining tests are harder to fix, I guess and have to do with serde_json
's (or Rusts) internal representation of types as strings.
For example:
self = <test_ujson.UltraJSONTests testMethod=test_encodeLongUnsignedConversion>
def test_encodeLongUnsignedConversion(self):
input = 18446744073709551615
output = hyperjson.dumps(input)
print(output)
> self.assertEqual(input, hyperjson.loads(output))
E AssertionError: 18446744073709551615 != 1.8446744073709552e+19
I don't know how to fix that yet. @wdv4758h, if you have an idea I'd be more than happy to listen. 😄
from hyperjson.
Correction, we are down to four failing test now. Fixed the issues regarding long int parsing.
See e47ef32.
from hyperjson.
Whoops, broke parse_int
test with the last commit.
Should be fixed now. So we're down to three failing tests now, which all have to do with utf8 handling.
Python handles utf8 as unicode code points when serializing, I guess. Don't know what to do in this case. We will see.
from hyperjson.
awesome progress !!! 🎆
from hyperjson.
With 7a73455 I decided to ignore the unicode encoding test failure.
UTF-8 encoding/decoding works interchangeably with json and hyperjson, the only thing that does not work (and does not make much sense imho) is to check the string lengths.
Therefore I commented that part and just kept the rest.
One more test to go!
from hyperjson.
Related Issues (20)
- [0.2.4] Low-level details in JSONDecodeError message by mistake? HOT 5
- dumps doesn't support indent HOT 1
- Dependabot can't resolve your Python dependency files
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- Dependabot can't resolve your Python dependency files
- Dependabot can't resolve your Python dependency files
- Dependabot can't resolve your Python dependency files
- Profiling support HOT 1
- Linking error with make build HOT 7
- few questions HOT 3
- Error when installing via pip HOT 11
- Make install doesn't work. HOT 3
- hypers standard script will not install on macosbeta HOT 1
- Automate deployment to Pypi HOT 5
- Compare with orjson
- Use smallvec to avoid heap allocations
- Add optional support for simdjson-rs behind a feature flag
- Zero-copy string deserialization HOT 1
- Speed up boolean encoding/decoding HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hyperjson.