Disintegrating HTTP #6

Closed
opened 2026-04-19 13:04:50 +00:00 by sch · 3 comments
sch commented 2026-04-19 13:04:50 +00:00 (Migrated from codeberg.org)

Is it sensible to disintegrate interface HTTP or to alocate several different modules to it (e.g. modules "aiohttp", "http", "httpx", and "requests")?

If it is not practical or would require a significant amount of maintenance; then, I rather to have this issue neglected.

Is it sensible to disintegrate interface HTTP or to alocate several different modules to it (e.g. modules "aiohttp", "http", "httpx", and "requests")? If it is not practical or would require a significant amount of maintenance; then, I rather to have this issue neglected.
marvin8 commented 2026-04-19 20:44:28 +00:00 (Migrated from codeberg.org)

Yeah... on the surface, this feels like it would be quite a bit of work.
I'll keep it in mind as a low priority, potential enhancement.

First thought is that any http library to use would have to support async which I think would disqualify requests and http?

Yeah... on the surface, this feels like it would be quite a bit of work. I'll keep it in mind as a low priority, potential enhancement. First thought is that any http library to use would have to support async which I think would disqualify `requests` and `http`?
sch commented 2026-04-20 05:12:08 +00:00 (Migrated from codeberg.org)

First thought is that any http library to use would have to support async which I think would disqualify requests and http?

Yes. I agree.

> First thought is that any http library to use would have to support async which I think would disqualify `requests` and `http`? Yes. I agree.
marvin8 commented 2026-06-08 03:06:33 +00:00 (Migrated from codeberg.org)

With the current "unrest" about httpx and newer forks of it (httpx2) I think the direction this will take is to internalize the http client creation.

This will be a major breaking change and also involve enabling a context manager for longwei so code could be written like:

async with APClient([...]) as instance:
    await instance.get_trending_statuses([...])
With the current "unrest" about `httpx` and newer forks of it (`httpx2`) I think the direction this will take is to internalize the http client creation. This will be a major breaking change and also involve enabling a context manager for `longwei` so code could be written like: ```python async with APClient([...]) as instance: await instance.get_trending_statuses([...]) ```
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
marvin8/longwei#6
No description provided.