oauth2-rs
oauth2-rs copied to clipboard
Upgrade to http 1.0
hyper has reached 1.0, and with it the http crate did as well. Since http is part of the public API for oauth2 (e.g., via the pub use http re-export), it'd be nice if oauth2 followed suit!
I took a stab at doing it myself, and it doesn't look too painful, except for the fact that there's not yet a version of reqwest that uses http 1.0 (https://github.com/seanmonstar/reqwest/issues/2039). Which means this is blocked for the time being, but I figured it'd still be useful to have a tracking issue.
sounds good! let's do this once reqwest supports 1.0, and that will require a major version bump of this crate and the downstream openidconnect crate.
I took a stab at doing it myself, and it doesn't look too painful,
How much of this have you got done already? Per #236 there's now consent to see if te Http{Request,Response} can be replaced with those from the http crate. Indeed, the 1.0 release seems to mainly solidify the API rather than introduce breaking changes.
(I came around this crate for the improved http<->ureq conversions that sparked #236, and am also interested in bumping to http 1.0.0 to be able to utilize that).
I stopped fairly early on when I realized that we'd need a release of reqwest that also uses http 1.0 first. That's not because of the public API, but rather just for type compatibility.
Also worth linking this, which it took me a bit to find: https://hyper.rs/guides/1/upgrading/
Does this crate use hyper, or only a few methods in reqwest (which uses hyper under the hood)?
for reqwest, we need wait upstream https://github.com/seanmonstar/reqwest/issues/2039
I've started merging breaking changes for the next major release (5.0) of this crate into main. Hopefully this change will be done soon enough to make it into 5.0 (no concrete timeframe).
Would it be possible to make a beta 5.0 branch depending on
reqwest = { git = "https://github.com/seanmonstar/reqwest.git", branch = "hyper-v1" }
So that the users of this crate work on their migration to be ready for the reqwest release ?
It's been merged! https://github.com/seanmonstar/reqwest/issues/2039
It's been merged! seanmonstar/reqwest#2039
I saw! I should have a branch ready soon, but I won't be able to cut a release until reqwest 0.12 is released with the changes
Alright, I've upgraded to http 1.0 in the http-1.0 branch. Until a release is cut, anyone can test it as follows:
oauth2 = { git = "https://github.com/ramosbugs/oauth2-rs.git", rev = "03bc493a3d90643c6deb77e0da12e9a1a90d9be5" }
@ramosbugs what would be the minimum required Rust compiler version for this?
Testing done, and this is working. Please merge
@ramosbugs what would be the minimum required Rust compiler version for this?
should still be 1.65
Testing done, and this is working. Please merge
still waiting on a reqwest 0.12 release: https://github.com/seanmonstar/reqwest/releases
5.0.0-alpha.3 is now released with dependencies on http 1.0 and reqwest 0.12
I assume you mean 5.0.0-alpha.3? :sweat_smile:
fixed, thanks! 🤦♂️