-
-
Notifications
You must be signed in to change notification settings - Fork 861
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
Questions on collaboration style #335
Comments
Brain-dumping some ideas here… I've looked a bit at the urllib3 branch on the
I think positioning HTTPX as the go-to async-capable HTTP client with a friendly user interface is a compelling story. HTTPX should do HTTP and work well with async environments (not necessarily in core, though?). I think I share your intuition on the lessons learnt from ASGI, though. I know Requests tried to build on a modular architecture via adapters, essentially aiming at becoming a platform which can be built on. I think the middleware idea we've been playing with belongs to the same realm, but maybe we can do better. I see a rather clear distinction between lower-level stuff (I/O, HTTP parsing, connection handling… i.e. the protocol abstraction layer) and higher-level stuff (pre-processing/post-processing/intercepting of requests/responses), and the pivot seems to be the request/response model. Wasn’t ASGI born from a similar situation?
The funny thing about AnyIO (but also our own concurrency backend) is that it kind of replicates the Trio API and incorporates its ideas. I personally start to think that Trio is a superior async library to say asyncio, but I don't think we can/should decide on a hard branch-off to trio land, simply because there's so much that's already been built around asyncio. Think Starlette, Uvicorn, databases, ORM… Most if not all of these Encode projects rely on asyncio and won't work with anything else without the same effort we've been putting into abstracting away asyncio as an async implementation. My personal opinion on all this is that we're kind of plagued by history and the fact that async Python has put the implementation at the developer front at all. My dream would be a sans-asynclib situation, in which we rely on a set of primitives that async libraries implements Right now it seems we're finding out those primitives from existing async libraries. |
Interesting discussion about async backends: dabeaz/curio#266 |
Thanks @florimondmanca - some great pointers there. |
This is prompted in part by an insightful comment from @agronholm...
I've got a couple of open questions around our collaboration style, and trying to figure out if we can be working on this more efficiently. Although we did explore the space, I hadn't realized that work is still actively continuing on the urllib3 branch, or that the
asks
project existed.Engaging with @agronholm's question: Is there space for us to be trying to combine our efforts more fruitfully? 🍐
For example:
Right now
httpx
is aiming at:There's a lot of ground to cover there - I'm really proud of the work we're all doing
My intuition is asking if we're moving too fast, and also that we might be better off trying to focus on building a tool that does one paritcular kind of thing well, rather than trying to build the swiss army penknife of HTTP in Python?
requests has threaded-concurrency Python decently covered already. It may be that we'll be doing more valuable work by building towards something more differentiated?
There are also open questions along these lines, such as:
I'm not sure I want to solicit public opinion on this just yet, so I'll keep this issue locked for the moment, at least for a bit. Right now this is just me getting my thoughts out in the open. 🤣 🤝
The text was updated successfully, but these errors were encountered: