Skip to content
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

llhttp should be a separate, optional package #8393

Open
1 task done
ml31415 opened this issue Apr 30, 2024 · 2 comments
Open
1 task done

llhttp should be a separate, optional package #8393

ml31415 opened this issue Apr 30, 2024 · 2 comments

Comments

@ml31415
Copy link

ml31415 commented Apr 30, 2024

Is your feature request related to a problem?

Currently there are several projects having python bindings for llhttp. There is

And I probably missed a couple of other ones. pyllhttp hasn't been updated for a long time and geventhttpclient also struggles with maintenance. Having a single, well maintained bindings package would profit the python ecosystem and share the maintenance in more hands.

At the same time, there are requests from people using alternative python implementations asking for pure python packages for easier integration:

Separating llhttp into a separate package would make their life easier as well.

Describe the solution you'd like

aiohttp features the best maintained python bindings for llhttp. It would be great, if not only aiohttp could profit from them. Separating the llhttp bindings into their own package and having it available as a readily available HTTP building block in line with other packages like multidict, h11 etc. would profit the python HTTP eco system as a whole and also make life easier for aiohttp users of non-standard python implementations.

Describe alternatives you've considered

pyllhttp and geventhttpclient have their own bindings using a plain C extension. Though, the cython code of aiohttp is imho nicer to read for the python user and less error prone than the c code within geventhttpclient. As all bindings just wrap around llhttp, I guess the performance differences should be marginal.

Additional context

This is more like suggesting a restructuring and not a new feature. So I'm not that sure if it really belongs here or better into the discussion section. Please just move it there, if you think it fits better.

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct
@webknjaz
Copy link
Member

I brought this up in the past, back when we were using the older project — http-parser — and not llhttp. I had similar thoughts but the reality is that the maintenance is not scalable.
I don't know who would have capacity to maintain a yet another thing. It took me over a year to just get to looking into multidict and releasing it, even more with Cheroot. More projects means more delays and more fragmented maintenance burden.

So while the idea is good (and I'd love to have an h11-compatible interface there), I personally am not ready to become responsible for an extra project being added to an already long list.

If somebody else is up for it, that's something to explore. But this would also open up a discussion of supply chain security. Not to mention potentially having to run a bigger CI matrix to account for compatibility with a bigger range of the critical dependency versions.

@ml31415
Copy link
Author

ml31415 commented May 1, 2024

Yeah, that are valid points. And of course it's nothing urgent. Maybe something to keep in mind and get a collaborative effort started at some point. Maybe also @pallas wants to revive his project at some point?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants