python-hyper / h2

HTTP/2 State-Machine based protocol implementation
https://h2.readthedocs.io/en/stable
MIT License
963 stars 151 forks source link

Switch from hyper to httpx not easy because H2 versions #1271

Closed juandiegopalomino closed 1 year ago

juandiegopalomino commented 2 years ago

Hi there! Big fan of the project, but I have a small problem:

Currently, we are using the old hyper package to make an http2 client critical to our application. It was a reliable old work horse, but now we need to update our client and that means moving from hyper to a newer package. Following common sense and your own recommendation, we're trying to move to httpx. However, because the piece of code using it is so crucial, we need to do a slow rollout meaning that both hyper and httpx ideally need to be present at the same time. The problem is that hyper has only been released until h2 version 2.6.2, and httpx's earliest use of h2 is 3.0.0, meaning we have a conflict. I'm wracking my brain trying to resolve it, but not sure what to do. Could it be possible that hyper can be made to work with h2 3.0.0?

tomchristie commented 1 year ago

Since the hyper repo is archived I can't see that happening, nope.

The problem is that hyper has only been released until h2 version 2.6.2, and httpx's earliest use of h2 is 3.0.0, meaning we have a conflict.

Python doesn't have any good answers for package conflicts like that. If I really needed to have two versions of the same package alongside each other I suppose I'd look into having them each installed locally, with unique package names. Bit fiddly really.