seanmonstar / reqwest

An easy and powerful Rust HTTP Client
https://docs.rs/reqwest
Apache License 2.0
9.92k stars 1.12k forks source link

Upgrade to hyper 1.0 #2039

Closed seanmonstar closed 8 months ago

seanmonstar commented 1 year ago

A tracking issue for upgrading reqwest to use hyper 1.0. It'll be a breaking change, and we should probably include some other breaking fixes that have piled up. But those can be tracked else where. This is just the items needed to update the hyper dependency.

Xuanwo commented 10 months ago

Hi, it appears that h3 doesn't directly depend on hyper. What actions do we need to take for h3? Can I provide any help for it?

atezet commented 10 months ago

h3 depends on http, which defines the types for hyper. h3 is already updated in https://github.com/hyperium/h3/commit/5c161952b02e663f31f9b83829bafa7a047b6627 but it still needs to be released on crates.io

yolmcore commented 10 months ago

Just checking for planning purposes, any idea how long until this ships? We'd like to upgrade to hyper 1, axum 0.7 and reqwest in one go, and reqwest is the odd one out.

seanmonstar commented 10 months ago

I've been pushing commits to #2059 as I make progress, in case any wants to watch or help.

sazzer commented 10 months ago

Just checking for planning purposes, any idea how long until this ships? We'd like to upgrade to hyper 1, axum 0.7 and reqwest in one go, and reqwest is the odd one out.

In case it helps, I've got code that uses hyper 1, axum 0.7 and current reqwest and works fine. It's not ideal because I've got to do some conversions myself because of mismatched http versions, but for what I've needed it's not been too hard.

atezet commented 10 months ago

Looks like hyper-rustls is making solid progress in https://github.com/rustls/hyper-rustls/pull/232, but h3 is not yet released. Is it getting time to ask for one?

rakshith-ravi commented 9 months ago

hyper-rustls 0.26 now seems to support hyper 1.0.

seanmonstar commented 9 months ago

Made a lot of progress today, most tests are passing. Seems the unstable h3 feature is blocked, since Quinn currently depends on rustls 0.21 (https://github.com/quinn-rs/quinn/pull/1715), but hyper-rustls depends on rustls 0.22.

ologbonowiwi commented 8 months ago

@seanmonstar merging #2059 is expected to be a breaking change? Asking because I'm working on a service that depends on reqwest and we plan to update to hyper v1.

It's recommended to wait for this to be closed, or the public APIs will not be changed?

NobodyXu commented 8 months ago

I skimmed through the PR and the only "breaking" change I found is the temporary removal of http3 feature, which is gated behind reqwest unstable cfg so it's probably ok.

scottlamb commented 8 months ago

First of all, yay, it's done and merged!

I skimmed through the PR and the only "breaking" change I found is the temporary removal of http3 feature, which is gated behind reqwest unstable cfg so it's probably ok.

I'm skeptical. I thought many public types such as reqwest::headers::HeaderMap were direct re-exports from http. They're now compatible with http 1.0 types rather than http 0.2 types. Isn't that a breaking change already? I think this needs to be released as reqwest 0.12.0 rather than 0.11.whatever?

seanmonstar commented 8 months ago

Correct, it is a breaking change. The exposed http types and integration are going from 0.2 to 1.0.

mladedav commented 8 months ago

Can I ask for a clarification about this? I see it's merged but not released yet but some versions with the old http version were released.

Is the release blocked on something else (docs or something else?) or does this just wait for the release itself?

zecakeh commented 8 months ago

Reqwest 0.12 was released yesterday with this.