-
Notifications
You must be signed in to change notification settings - Fork 228
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
loads does not handle subclasses of str #445
Comments
Note that this also fails (even when trying to catch
EDIT: I see that this may be normal according to https://github.com/ijl/orjson#opt_non_str_keys |
I don't agree these fall under "non str keys", that option is to allow keys which are |
This is a sort of feature request if you squint, but not in a useful way, and I don't think it would be productive to engage. Someone else is welcome to do it better. |
@ijl I think I agree with the reasoning not to accept by default subclasses of But this bug is not to be conflated with #446: I understand that you may want to handle (BTW, kudos for having the courage to tackle the nonsense that is CPython interfaced from other languages I understand that having to handle subclasses is cumbersome and that you don't really know if someone broke some fundamental promise of vanilla |
I found that you already merged #438 so I suppose you could just fallback to the same |
@FrnchFrgg fyi that was closed as stale, not merged. Rebased in #454 |
Looks like the stale bot is very aggressive 😅, i’m going to incorporate this change in my fork xorjson |
Expected outcome:
Subclasses of str should be handled
Actual outcome:
orjson.loads
blows upStep by step reproduction:
The text was updated successfully, but these errors were encountered: