-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add stubs for ujson #460
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
Add stubs for ujson #460
Conversation
|
Have you checked with the developers of ujson whether they are okay with including these stubs in typeshed? Our policy for third_party packages requires checking this. You can probably just ask them in their tracker and once they respond, link back to their tracker issue here. |
|
PS. Would be nice if we had a bot that automatically asked that whenever someone submits stubs for a new package in third_party. |
|
I asked them just now, and they were ok with it: ultrajson/ultrajson#233 |
|
@Michael0x2a how confident are you that the |
|
(For context, I'm getting errors trying to use this with the Zulip project, which has annotations assuming that e.g. |
|
Can't you just try this in the REPL? Should take 1 minute if you have ujson
installed and will tell you the truth.
|
|
Hmm, you might be right -- in retrospect, I'm not sure if I tested my stubs very thoroughly on Python 2. I did some quick testing, and it seems like the But perhaps I'm wrong about this again. |
|
Yeah, I just tested as well and indeed |
The ujson module apparently will accept both bytes and text format input, however, it does always output a str (both on Python 2 and Python 3). Some discussion in: python#460
|
Opened #540 to fix this issue. Thanks @Michael0x2a for also investigating this :) |
The ujson module apparently will accept both bytes and text format input, however, it does always output a str (both on Python 2 and Python 3). Some discussion in: #460
This pull request adds stubs for ujson. Note that the interface for ujson is a bit more restrictive then the interface for the json module in the standard library.