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

Combining efforts? #22

Closed
njsmith opened this issue Apr 28, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@njsmith
Copy link

commented Apr 28, 2019

Hey, I just discovered this. Looks pretty cool!

I don't know if you're aware, but we've been working on a similar project for a while now:

Some key features:

  • Based on urllib3, rather than a rewrite, to take advantage of their years of work finding edge-cases. Supports tricky stuff like proxies and early responses.
  • Designed to support multiple sync and async backends (asyncio, trio, twisted, ...) within a single code base
  • Python 2 support (not sure how important this is – we might end up dropping it – but there are some important projects like botocore and pip that want to support async but won't be able to drop python 2 for a few years yet)
  • Working with the urllib3 devs to manage the transition: python-trio/urllib3#84

I'd love to hear more about what you're planning, and compare notes. Could do it here, or do a video chat on Monday, or perhaps we could meet up at PyCon this week?

@tomchristie

This comment has been minimized.

Copy link
Member

commented Apr 29, 2019

Yes mate! I'm not at PyCon sadly. We can either chat here or DM me on twitter and I'll ping you my skype username.

I've been doing some work on the adapters branch that's not yet made it back into master, but together with what's already here that'd give us...

  • Easy to add trio support - all the asyncio specific bits factored into a single (small) place.
  • HTTP/1.1 and HTTP/2 support.
  • Sync and ASync variants.
  • Composible approach to adding in behaviors for redirects, cookie persitence, environment modifiers (eg. .netrc), authentication.

We should chat.

@tomchristie

This comment has been minimized.

Copy link
Member

commented May 1, 2019

We chatted. And it was good.

I'm v. confident in the approach here - tho there will doubtless be tons of good experience and edge casing for us to bring across from urllib3. (Eg. decoding gnarliness, early responses, etc.)

Going to keep working on getting the API complete, fully test-covered, etc.etc. then can review what good stuff to pull across from urllib3's gnarly-real-world HTTP experience.

@tomchristie tomchristie closed this May 1, 2019

@njsmith

This comment has been minimized.

Copy link
Author

commented May 1, 2019

I'd definitely suggest checking out the core HTTP logic and networking layer, which is where a lot of the attention has gone:

https://github.com/python-trio/urllib3/blob/bleach-spike/src/urllib3/_async/connection.py
https://github.com/python-trio/urllib3/tree/bleach-spike/src/urllib3/_backends

This handles proxy support, early responses, the backend API has been iterated on repeatedly to narrow it down to something workable, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.