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

1.0 announcement / funding page #1797

Closed
wants to merge 3 commits into from
Closed

1.0 announcement / funding page #1797

wants to merge 3 commits into from

Conversation

tomchristie
Copy link
Member

Starting to flesh out a 1.0 announcement, call for sponsors, and roadmap for future development...

Copy link
Member

@florimondmanca florimondmanca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick review from me. That's an exciting perspective!


### A sustainable and transparent business model

Throughout the project we'll be issuing weekly progress reports, to give your businesses confidence that
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

End of sentence missing? :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... it's still in progress in places. 😅

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should link to the reports: https://www.encode.io/reports/

@tomchristie
Copy link
Member Author

That's an exciting perspective!

Certainly helps to lay out the direction, eh? Helpful for me too, since I can see it more clearly, and get priorities in order.


HTTPX is the **only** Python HTTP client with **HTTP/1.1 and HTTP/2** support, as well as being the only client providing both **sync and async** support. We'd like to continue pushing the project forward, and we're asking for sponsors to help us in building the foundation of modern HTTP stack for Python.

We've spent a long time finessing the API for the project, and we're now happy to release a 1.0 version, and provide a standard SEMVER policy on future API updates.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should flesh out the stability policy per https://docs.twistedmatrix.com/en/latest/core/development/policy/compatibility-policy.html

and include a separate policy for type hints, and behaviour under adverse conditions such as cancellation


### HTTPX 1.3 & beyond...

Resource limits for the total download time, and maximum allowed download size. Support for WebSockets which run transparently over either HTTP/1.1 or HTTP/2. Documentation for using advanced functionality such as HTTP/2 bi-directional streaming, or working with network streams established using CONNECT or Upgrade requests. Support for a URLLib3 backend, which will aid projects that want upgrade from requests but still keep the underlying networking changes to an absolute minimum.
Copy link
Member

@graingert graingert Aug 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

websockets don't run over HTTP/1.1 in the exact same way that HTTP/2 doesn't run over HTTP/1.1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@graingert graingert Aug 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there also doesn't seem to be any interest in websockets over http3. I suspect because on HTTP 3 EventSource should out-perform websockets.

The new developments are on https://datatracker.ietf.org/doc/html/draft-ietf-webtrans-http3 that adds "websocket"-like transports with multi homing and datagram support.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Resource limits for the total download time, and maximum allowed download size. Support for WebSockets which run transparently over either HTTP/1.1 or HTTP/2. Documentation for using advanced functionality such as HTTP/2 bi-directional streaming, or working with network streams established using CONNECT or Upgrade requests. Support for a URLLib3 backend, which will aid projects that want upgrade from requests but still keep the underlying networking changes to an absolute minimum.
Resource limits for the total download time, and maximum allowed download size. Support for WebSockets which run transparently over either HTTP/1.1 or HTTP/2. Documentation for using advanced functionality such as HTTP/2 bi-directional streaming, or working with network streams established using CONNECT or Upgrade requests. Support for a urllib3 backend, which will aid projects that want upgrade from requests but still keep the underlying networking changes to an absolute minimum.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That 2016 blog post is out of date. The websockets-over-http/2 spec is RFC 8441.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah indeed it's shipping in chrome and firefox already https://www.chromestatus.com/feature/6251293127475200

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so I'm reading this as websockets can run on their own "compatible with http 1.1" using "http Upgrade" (as opposed to tunnelled 'over http 1.1'), RFC 8441 websockets however are tunnelled over HTTP 2 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it'd probably be a little clearer to say "negotiated transparently over HTTP/1.1 or HTTP/2".

The idea is that upgrading to a raw network read/write API would work equally well against either HTTP/1.1 or HTTP/2, without the developer seeing any difference. Against HTTP/1.1 those read/write operations would map straight onto the TCP connection, but with HTTP/2 they'd map onto a single HTTP/2 stream.

We can achieve this without adding any extra API methods by exposing the stream as an extension.

with client.get(..., headers={"Upgrade": ...}) as response:
    if response.status_code != 101:
        ...
    stream = response.extensions["stream"]
    ...

My feeling is that we probably want to tightly scope things, so that we show how HTTPX can be used at this kind of level of API, without necessarily also building a full websockets API on top of HTTPX. (We can leave that to other packages to build on top of.)

* Fully supports all the features that the `requests` package provides.
* Both HTTP/1.1 and HTTP/2 support.
* Strict request timeouts enabled by default.
* Support for the asyncio and trio concurrency environments.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

burying the lede here. are you dropping crucio?

This was referenced Aug 18, 2021
@yjqiang
Copy link

yjqiang commented Sep 5, 2021

@tomchristie
Copy link
Member Author

@yjqiang I don't think the phrasing there is properly indicative of the differences, but yes we ought to include DNS caching for the 1.3 release.

@tomchristie
Copy link
Member Author

Some thoughts here:

  • Scope out 1.3 so that it's not open-ended. Have a properly defined end-goal for the project. "This much functionality and no more planned beyond that". Doesn't mean with might not potentially accept some additions as we go, but having a well defined scope has got to be a good thing for the project.
  • We could feasibly switch around 1.1 and 1.2 here depending on how we consider each of them as priorities.

@stale
Copy link

stale bot commented Feb 19, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 19, 2022
@tomchristie tomchristie mentioned this pull request Feb 21, 2022
@stale stale bot closed this Feb 27, 2022
@tomchristie tomchristie deleted the funding-page branch March 1, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants