Skip to content

ujson library mentioned in the documentation is deprecated #10795

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

Open
1 task done
ashrub-holvi opened this issue Apr 25, 2025 · 3 comments
Open
1 task done

ujson library mentioned in the documentation is deprecated #10795

ashrub-holvi opened this issue Apr 25, 2025 · 3 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@ashrub-holvi
Copy link

ashrub-holvi commented Apr 25, 2025

Is your feature request related to a problem?

https://docs.aiohttp.org/en/latest/client_quickstart.html says:

Note
ujson library is faster than standard json but slightly incompatible.

but docs https://pypi.org/project/ujson/ says:

[!WARNING] UltraJSON's architecture is fundamentally ill-suited to making changes without risk of introducing new security vulnerabilities. As a result, this library has been put into a maintenance-only mode. Support for new Python versions will be added and critical bugs and security issues will still be fixed but all other changes will be rejected. Users are encouraged to migrate to orjson which is both much faster and less likely to introduce a surprise buffer overflow vulnerability in the future.

Describe the solution you'd like

simplest option is just to not mention anything directly, but put some link to discussion/issue about alternative json libs, but just replacing ujson by orjson will works as well.

Describe alternatives you've considered


Related component

Client

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct
@webknjaz webknjaz added documentation Improvements or additions to documentation good first issue Good for newcomers and removed enhancement labels Apr 25, 2025
@Dreamsorcerer
Copy link
Member

Complication is that orjson isn't a compatible replacement, if I remember correctly. It uses bytes instead of str, so probably needs slightly more changing than just the library name.

@Dreamsorcerer
Copy link
Member

I'm wondering if we might even want to add a parameter or new function to accept bytes first..

@bdraco
Copy link
Member

bdraco commented Apr 25, 2025

I'm wondering if we might even want to add a parameter or new function to accept bytes first..

Sound good to me. A large percentage of projects I work with use orjson now and it's in the top 360 PyPI packages now so there is lots of usage in the community that would warrant giving it a little bit more attention

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
Development

No branches or pull requests

4 participants