question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Require `pip install httpx[http2]` for HTTP/2 support

See original GitHub issue

I wonder if we should consider having HTTP/2 be an optional requirement, rather than always-on.

I’ve been working towards minimal installs in other projects eg. Starlette (no hard dependencies) and Uvicorn - we’re planning to move towards pip install uvicorn for a basse install of just click and h11, and pip install uvicorn[default] to pull in websockets plus platform specfic stuff like uvloop and httptools. And generally with the other projects in the encode async space too.

We could consider having minimal and default install options with httpx too… eg:

  • pip install httpx - Just http/1.1 support.
  • pip install httpx[defaults] - Also http/2. Potentially http/3 and/or websocket support at a future date. Possible that hsts isn’t strictly a hard requirement either.

Any thoughts?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
florimondmancacommented, Dec 31, 2019

Yup, agreed after our discussions on #639. The off-by-default behavior is probably sufficient as a “this is edge stuff” flag. At least having it off by default protects our users from dealing with HTTP/2 issues when all they want is to make HTTP requests, regardless of HTTP/1.1 vs HTTP/2.

0reactions
tomchristiecommented, Dec 31, 2019

I’m going to suggest we drop this. Any thoughts?

Our HTTP/2 implemenentation has greatly improved, and even tho it’s currently not enabled by default I could see us switching that once we judge it to be sufficiently mature. I’m no longer convinced that “minimal installs” are worth the additional hoop for users to jump through and codebase complexity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP/2 Support - HTTPX
You can do so by first making sure to install the optional HTTP/2 dependencies... $ pip install httpx[http2]. And then instantiating a client...
Read more >
HTTP/2 Support - Soteri Documentation
HTTPX is a python library which provides support for HTTP/2 requests. ... First, install optional HTTP/2 requirements in your environment: pip install ......
Read more >
httpx · PyPI
Installation. Install with pip: $ pip install httpx. Or, to include the optional HTTP/2 support, use: $ pip install httpx[http2]. HTTPX requires Python...
Read more >
0 - Stack Overflow
1/http2 with python, the code is as simple as repeating a Google search request many times. The result is interesting: the http2 version...
Read more >
HTTPX: A Next-Generation HTTP Client for Python - Morioh
Installation. Install with pip: $ pip install httpx. Or, to include the optional HTTP/2 support, use: $ pip install httpx[http2]. HTTPX requires Python...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found