diff --git a/.cspell.json b/.cspell.json index 47fc5d18e8..23ecd03c8b 100644 --- a/.cspell.json +++ b/.cspell.json @@ -37,7 +37,6 @@ "Dirkjan", "EPYC", "hasher", - "isahc", "Isobel", "jaegertracing", "Kühle", diff --git a/Cargo.toml b/Cargo.toml index f5d93d6b8a..28a0dea98d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,6 @@ futures-executor = "0.3" futures-util = { version = "0.3", default-features = false } hyper = { version = "0.14", default-features = false } http = { version = "0.2", default-features = false } -isahc = { version = "1.4", default-features = false } log = "0.4.21" once_cell = "1.13" ordered-float = "4.0" @@ -46,4 +45,4 @@ tokio-stream = "0.1.1" tracing = { version = "0.1", default-features = false } tracing-core = { version = "0.1", default-features = false } tracing-subscriber = { version = "0.3", default-features = false } -url = { version = "=2.5.0", default-features = false } #pinning the version supporting rustc 1.65 +url = { version = "2.5", default-features = false } diff --git a/opentelemetry-http/CHANGELOG.md b/opentelemetry-http/CHANGELOG.md index c19fd56dea..51880f3c31 100644 --- a/opentelemetry-http/CHANGELOG.md +++ b/opentelemetry-http/CHANGELOG.md @@ -3,6 +3,7 @@ ## vNext - **Breaking** Correct the misspelling of "webkpi" to "webpki" in features [#1842](https://github.com/open-telemetry/opentelemetry-rust/pull/1842) +- **Breaking** Remove support for the `isahc` HTTP client [#1924](https://github.com/open-telemetry/opentelemetry-rust/pull/1924) ## v0.12.0 diff --git a/opentelemetry-http/Cargo.toml b/opentelemetry-http/Cargo.toml index a3fda11719..f7472054df 100644 --- a/opentelemetry-http/Cargo.toml +++ b/opentelemetry-http/Cargo.toml @@ -18,7 +18,6 @@ async-trait = { workspace = true } bytes = { workspace = true } http = { workspace = true } hyper = { workspace = true, features = ["http2", "client", "tcp"], optional = true } -isahc = { workspace = true, optional = true } opentelemetry = { version = "0.23", path = "../opentelemetry", features = ["trace"] } reqwest = { workspace = true, features = ["blocking"], optional = true } tokio = { workspace = true, features = ["time"], optional = true } diff --git a/opentelemetry-http/src/lib.rs b/opentelemetry-http/src/lib.rs index cee858b647..b921a41d9c 100644 --- a/opentelemetry-http/src/lib.rs +++ b/opentelemetry-http/src/lib.rs @@ -99,32 +99,6 @@ mod reqwest { } } -#[cfg(feature = "isahc")] -mod isahc { - use crate::ResponseExt; - - use super::{async_trait, Bytes, HttpClient, HttpError, Request, Response}; - use isahc::AsyncReadResponseExt; - use std::convert::TryInto as _; - - #[async_trait] - impl HttpClient for isahc::HttpClient { - async fn send(&self, request: Request>) -> Result, HttpError> { - let mut response = self.send_async(request).await?; - let mut bytes = Vec::with_capacity(response.body().len().unwrap_or(0).try_into()?); - response.copy_to(&mut bytes).await?; - - let headers = std::mem::take(response.headers_mut()); - let mut http_response = Response::builder() - .status(response.status().as_u16()) - .body(bytes.into())?; - *http_response.headers_mut() = headers; - - Ok(http_response.error_for_status()?) - } - } -} - #[cfg(feature = "hyper")] pub mod hyper { use crate::ResponseExt; diff --git a/scripts/patch_dependencies.sh b/scripts/patch_dependencies.sh index ff7ffc7070..d52547db67 100755 --- a/scripts/patch_dependencies.sh +++ b/scripts/patch_dependencies.sh @@ -6,3 +6,5 @@ function patch_version() { cargo update -p $1:$latest_version --precise $2 } +patch_version cc 1.0.105 +patch_version url 2.5.0