aio-libs / aio-libs/aiohttp

llhttp should be a separate, optional package

Đang mở
#8,393 2 bình luận 1 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
Python
Star
16.5k
Fork
2.4k
Merge trung bình
17 giờ 22 phút
Pull request đã merge (30 ngày)
212

Mô tả

### Is your feature request related to a problem?

Currently there are several projects having python bindings for `llhttp`. There is
- https://github.com/pallas/pyllhttp
- https://github.com/geventhttpclient/geventhttpclient
- aiohttp

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:
- https://github.com/aio-libs/aiohttp/issues/7632
- https://github.com/aio-libs/aiohttp/issues/6584
- https://github.com/aio-libs/aiohttp/issues/7802

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](https://github.com/geventhttpclient/geventhttpclient/blob/master/ext/_parser.c). 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

- [X] I agree to follow the aio-libs Code of Conduct

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.