Require `pip install httpx[http2]` for HTTP/2 support
See original GitHub issueI 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:
- Created 4 years ago
- Reactions:3
- Comments:5 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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.