From 44bb38dfa2a9cd748963aa6bbfa39ac91767983b Mon Sep 17 00:00:00 2001 From: David Pedersen Date: Thu, 23 Mar 2023 22:38:37 +0100 Subject: [PATCH] update deps --- axum-core/Cargo.toml | 4 +- axum-extra/Cargo.toml | 6 +-- axum/Cargo.toml | 10 ++-- .../Cargo.toml | 2 +- examples/graceful-shutdown/Cargo.toml | 2 +- examples/handle-head-request/Cargo.toml | 2 +- examples/http-proxy/Cargo.toml | 2 +- examples/hyper-1-0/Cargo.toml | 14 ----- examples/hyper-1-0/src/main.rs | 52 ------------------- examples/listen-multiple-addrs/Cargo.toml | 2 +- examples/low-level-openssl/Cargo.toml | 2 +- examples/low-level-rustls/Cargo.toml | 2 +- examples/print-request-response/Cargo.toml | 2 +- .../Cargo.toml | 2 +- examples/rest-grpc-multiplex/Cargo.toml | 2 +- examples/reverse-proxy/Cargo.toml | 2 +- examples/testing-websockets/Cargo.toml | 2 +- examples/testing/Cargo.toml | 2 +- examples/unix-domain-socket/Cargo.toml | 2 +- examples/validator/Cargo.toml | 2 +- 20 files changed, 23 insertions(+), 93 deletions(-) delete mode 100644 examples/hyper-1-0/Cargo.toml delete mode 100644 examples/hyper-1-0/src/main.rs diff --git a/axum-core/Cargo.toml b/axum-core/Cargo.toml index 129d212c..2cf7ef51 100644 --- a/axum-core/Cargo.toml +++ b/axum-core/Cargo.toml @@ -19,7 +19,7 @@ async-trait = "0.1.67" bytes = "1.0" futures-util = { version = "0.3", default-features = false, features = ["alloc"] } http = "0.2.7" -http-body = "0.4.5" +http-body = "1.0.0-rc.2" mime = "0.3.16" pin-project-lite = "0.2.7" sync_wrapper = "0.1.1" @@ -35,7 +35,7 @@ rustversion = "1.0.9" [dev-dependencies] axum = { path = "../axum", version = "0.6.0", features = ["headers"] } futures-util = { version = "0.3", default-features = false, features = ["alloc"] } -hyper = "0.14.24" +hyper = "1.0.0-rc.3" tokio = { version = "1.25.0", features = ["macros"] } tower-http = { version = "0.4", features = ["limit"] } diff --git a/axum-extra/Cargo.toml b/axum-extra/Cargo.toml index 984ebb3f..cbc44994 100644 --- a/axum-extra/Cargo.toml +++ b/axum-extra/Cargo.toml @@ -39,7 +39,7 @@ axum = { path = "../axum", version = "0.6.9", default-features = false } bytes = "1.1.0" futures-util = { version = "0.3", default-features = false, features = ["alloc"] } http = "0.2" -http-body = "0.4.4" +http-body = "1.0.0-rc.2" mime = "0.3" pin-project-lite = "0.2" tokio = "1.19" @@ -63,8 +63,8 @@ tokio-util = { version = "0.7", optional = true } [dev-dependencies] axum = { path = "../axum", version = "0.6.0", features = ["headers"] } -http-body = "0.4.4" -hyper = "0.14" +http-body = "1.0.0-rc.2" +hyper = "1.0.0-rc.3" reqwest = { version = "0.11", default-features = false, features = ["json", "stream", "multipart"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0.71" diff --git a/axum/Cargo.toml b/axum/Cargo.toml index 43a7f04a..802082cb 100644 --- a/axum/Cargo.toml +++ b/axum/Cargo.toml @@ -22,7 +22,7 @@ matched-path = [] multipart = ["dep:multer"] original-uri = [] query = ["dep:serde_urlencoded"] -tokio = ["dep:tokio", "hyper/server", "hyper/tcp", "hyper/runtime", "tower/make"] +tokio = ["dep:tokio", "hyper/server", "tower/make"] tower-log = ["tower/log"] ws = ["tokio", "dep:tokio-tungstenite", "dep:sha1", "dep:base64"] @@ -36,8 +36,8 @@ bitflags = "1.0" bytes = "1.0" futures-util = { version = "0.3", default-features = false, features = ["alloc"] } http = "0.2.9" -http-body = "0.4.4" -hyper = { version = "0.14.24", features = ["stream"] } +http-body = "1.0.0-rc.2" +hyper = "1.0.0-rc.3" itoa = "1.0.5" matchit = "0.7" memchr = "2.4.1" @@ -50,10 +50,6 @@ tower = { version = "0.4.13", default-features = false, features = ["util"] } tower-layer = "0.3.2" tower-service = "0.3" -# wont need this when axum uses http-body 1.0 -hyper1 = { package = "hyper", version = "1.0.0-rc.3", features = ["server", "http1"] } -tower-hyper-http-body-compat = { version = "0.1.4", features = ["server", "http1"] } - # optional dependencies axum-macros = { path = "../axum-macros", version = "0.3.7", optional = true } base64 = { version = "0.21.0", optional = true } diff --git a/examples/consume-body-in-extractor-or-middleware/Cargo.toml b/examples/consume-body-in-extractor-or-middleware/Cargo.toml index 655ffae1..29ee2a07 100644 --- a/examples/consume-body-in-extractor-or-middleware/Cargo.toml +++ b/examples/consume-body-in-extractor-or-middleware/Cargo.toml @@ -6,7 +6,7 @@ publish = false [dependencies] axum = { path = "../../axum" } -hyper = "0.14" +hyper = "1.0.0-rc.3" tokio = { version = "1.0", features = ["full"] } tower = "0.4" tower-http = { version = "0.4.0", features = ["map-request-body", "util"] } diff --git a/examples/graceful-shutdown/Cargo.toml b/examples/graceful-shutdown/Cargo.toml index f287feeb..e6909bf5 100644 --- a/examples/graceful-shutdown/Cargo.toml +++ b/examples/graceful-shutdown/Cargo.toml @@ -6,5 +6,5 @@ publish = false [dependencies] axum = { path = "../../axum" } -hyper = { version = "0.14", features = ["full"] } +hyper = { version = "1.0.0-rc.3", features = ["full"] } tokio = { version = "1.0", features = ["full"] } diff --git a/examples/handle-head-request/Cargo.toml b/examples/handle-head-request/Cargo.toml index 0672b238..c32a726d 100644 --- a/examples/handle-head-request/Cargo.toml +++ b/examples/handle-head-request/Cargo.toml @@ -9,5 +9,5 @@ axum = { path = "../../axum" } tokio = { version = "1.0", features = ["full"] } [dev-dependencies] -hyper = { version = "0.14", features = ["full"] } +hyper = { version = "1.0.0-rc.3", features = ["full"] } tower = { version = "0.4", features = ["util"] } diff --git a/examples/http-proxy/Cargo.toml b/examples/http-proxy/Cargo.toml index 90ea85c5..64ba31f8 100644 --- a/examples/http-proxy/Cargo.toml +++ b/examples/http-proxy/Cargo.toml @@ -6,7 +6,7 @@ publish = false [dependencies] axum = { path = "../../axum" } -hyper = { version = "0.14", features = ["full"] } +hyper = { version = "1.0.0-rc.3", features = ["full"] } tokio = { version = "1.0", features = ["full"] } tower = { version = "0.4", features = ["make"] } tracing = "0.1" diff --git a/examples/hyper-1-0/Cargo.toml b/examples/hyper-1-0/Cargo.toml deleted file mode 100644 index 772b268d..00000000 --- a/examples/hyper-1-0/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "example-hyper-1-0" -version = "0.1.0" -edition = "2021" -publish = false - -[dependencies] -axum = { path = "../../axum" } -hyper = { version = "1.0.0-rc.3", features = ["full"] } -tokio = { version = "1.0", features = ["full"] } -tower-http = { version = "0.4", features = ["trace"] } -tower-hyper-http-body-compat = { version = "0.1", features = ["http1", "server"] } -tracing = "0.1" -tracing-subscriber = { version = "0.3", features = ["env-filter"] } diff --git a/examples/hyper-1-0/src/main.rs b/examples/hyper-1-0/src/main.rs deleted file mode 100644 index 51493d44..00000000 --- a/examples/hyper-1-0/src/main.rs +++ /dev/null @@ -1,52 +0,0 @@ -//! Run with -//! -//! ```not_rust -//! cargo run -p example-hyper-1-0 -//! ``` - -use axum::{routing::get, Router}; -use std::net::SocketAddr; -use tokio::net::TcpListener; -use tower_http::trace::TraceLayer; -use tower_hyper_http_body_compat::TowerService03HttpServiceAsHyper1HttpService; -use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; - -// this is hyper 1.0 -use hyper::server::conn::http1; - -#[tokio::main] -async fn main() { - tracing_subscriber::registry() - .with( - tracing_subscriber::EnvFilter::try_from_default_env() - .unwrap_or_else(|_| "example_hyper_1_0=debug".into()), - ) - .with(tracing_subscriber::fmt::layer()) - .init(); - - let app = Router::new() - .route("/", get(|| async { "Hello, World!" })) - // we can still add regular tower middleware - .layer(TraceLayer::new_for_http()); - - // `Router` implements tower-service 0.3's `Service` trait. Convert that to something - // that implements hyper 1.0's `Service` trait. - let service = TowerService03HttpServiceAsHyper1HttpService::new(app); - - let addr = SocketAddr::from(([127, 0, 0, 1], 3000)); - let tcp_listener = TcpListener::bind(addr).await.unwrap(); - tracing::debug!("listening on {addr}"); - loop { - let (tcp_stream, _) = tcp_listener.accept().await.unwrap(); - let service = service.clone(); - tokio::task::spawn(async move { - if let Err(http_err) = http1::Builder::new() - .keep_alive(true) - .serve_connection(tcp_stream, service) - .await - { - eprintln!("Error while serving HTTP connection: {http_err}"); - } - }); - } -} diff --git a/examples/listen-multiple-addrs/Cargo.toml b/examples/listen-multiple-addrs/Cargo.toml index 5aeebc9e..3f66cc46 100644 --- a/examples/listen-multiple-addrs/Cargo.toml +++ b/examples/listen-multiple-addrs/Cargo.toml @@ -6,5 +6,5 @@ publish = false [dependencies] axum = { path = "../../axum" } -hyper = { version = "0.14", features = ["full"] } +hyper = { version = "1.0.0-rc.3", features = ["full"] } tokio = { version = "1", features = ["full"] } diff --git a/examples/low-level-openssl/Cargo.toml b/examples/low-level-openssl/Cargo.toml index d0e1a46d..4e1266c7 100644 --- a/examples/low-level-openssl/Cargo.toml +++ b/examples/low-level-openssl/Cargo.toml @@ -7,7 +7,7 @@ publish = false [dependencies] axum = { path = "../../axum" } futures-util = { version = "0.3", default-features = false, features = ["alloc"] } -hyper = { version = "0.14", features = ["full"] } +hyper = { version = "1.0.0-rc.3", features = ["full"] } openssl = "0.10" tokio = { version = "1", features = ["full"] } tokio-openssl = "0.6" diff --git a/examples/low-level-rustls/Cargo.toml b/examples/low-level-rustls/Cargo.toml index 91069128..ae2944b4 100644 --- a/examples/low-level-rustls/Cargo.toml +++ b/examples/low-level-rustls/Cargo.toml @@ -7,7 +7,7 @@ publish = false [dependencies] axum = { path = "../../axum" } futures-util = { version = "0.3", default-features = false, features = ["alloc"] } -hyper = { version = "0.14", features = ["full"] } +hyper = { version = "1.0.0-rc.3", features = ["full"] } rustls-pemfile = "0.3" tokio = { version = "1", features = ["full"] } tokio-rustls = "0.23" diff --git a/examples/print-request-response/Cargo.toml b/examples/print-request-response/Cargo.toml index e59f7eae..1b95f35f 100644 --- a/examples/print-request-response/Cargo.toml +++ b/examples/print-request-response/Cargo.toml @@ -6,7 +6,7 @@ publish = false [dependencies] axum = { path = "../../axum" } -hyper = { version = "0.14", features = ["full"] } +hyper = { version = "1.0.0-rc.3", features = ["full"] } tokio = { version = "1.0", features = ["full"] } tower = { version = "0.4", features = ["util", "filter"] } tracing = "0.1" diff --git a/examples/query-params-with-empty-strings/Cargo.toml b/examples/query-params-with-empty-strings/Cargo.toml index b64c1244..30a61155 100644 --- a/examples/query-params-with-empty-strings/Cargo.toml +++ b/examples/query-params-with-empty-strings/Cargo.toml @@ -6,7 +6,7 @@ publish = false [dependencies] axum = { path = "../../axum" } -hyper = "0.14" +hyper = "1.0.0-rc.3" serde = { version = "1.0", features = ["derive"] } tokio = { version = "1.0", features = ["full"] } tower = { version = "0.4", features = ["util"] } diff --git a/examples/rest-grpc-multiplex/Cargo.toml b/examples/rest-grpc-multiplex/Cargo.toml index 61afe01a..57a106a4 100644 --- a/examples/rest-grpc-multiplex/Cargo.toml +++ b/examples/rest-grpc-multiplex/Cargo.toml @@ -7,7 +7,7 @@ publish = false [dependencies] axum = { path = "../../axum" } futures = "0.3" -hyper = { version = "0.14", features = ["full"] } +hyper = { version = "1.0.0-rc.3", features = ["full"] } prost = "0.11" tokio = { version = "1", features = ["full"] } tonic = { version = "0.8" } diff --git a/examples/reverse-proxy/Cargo.toml b/examples/reverse-proxy/Cargo.toml index 81ddb519..9f97c9df 100644 --- a/examples/reverse-proxy/Cargo.toml +++ b/examples/reverse-proxy/Cargo.toml @@ -5,5 +5,5 @@ edition = "2021" [dependencies] axum = { path = "../../axum" } -hyper = { version = "0.14", features = ["full"] } +hyper = { version = "1.0.0-rc.3", features = ["full"] } tokio = { version = "1", features = ["full"] } diff --git a/examples/testing-websockets/Cargo.toml b/examples/testing-websockets/Cargo.toml index 26c4f8d4..2806648b 100644 --- a/examples/testing-websockets/Cargo.toml +++ b/examples/testing-websockets/Cargo.toml @@ -7,6 +7,6 @@ publish = false [dependencies] axum = { path = "../../axum", features = ["ws"] } futures = "0.3" -hyper = { version = "0.14", features = ["full"] } +hyper = { version = "1.0.0-rc.3", features = ["full"] } tokio = { version = "1.0", features = ["full"] } tokio-tungstenite = "0.17" diff --git a/examples/testing/Cargo.toml b/examples/testing/Cargo.toml index fbfb0544..a100516b 100644 --- a/examples/testing/Cargo.toml +++ b/examples/testing/Cargo.toml @@ -6,7 +6,7 @@ publish = false [dependencies] axum = { path = "../../axum" } -hyper = { version = "0.14", features = ["full"] } +hyper = { version = "1.0.0-rc.3", features = ["full"] } mime = "0.3" serde_json = "1.0" tokio = { version = "1.0", features = ["full"] } diff --git a/examples/unix-domain-socket/Cargo.toml b/examples/unix-domain-socket/Cargo.toml index e3e01846..7702caca 100644 --- a/examples/unix-domain-socket/Cargo.toml +++ b/examples/unix-domain-socket/Cargo.toml @@ -7,7 +7,7 @@ publish = false [dependencies] axum = { path = "../../axum" } futures = "0.3" -hyper = { version = "0.14", features = ["full"] } +hyper = { version = "1.0.0-rc.3", features = ["full"] } tokio = { version = "1.0", features = ["full"] } tower = { version = "0.4", features = ["util"] } tracing = "0.1" diff --git a/examples/validator/Cargo.toml b/examples/validator/Cargo.toml index b164a30a..bb7125a7 100644 --- a/examples/validator/Cargo.toml +++ b/examples/validator/Cargo.toml @@ -7,7 +7,7 @@ version = "0.1.0" [dependencies] async-trait = "0.1.67" axum = { path = "../../axum" } -http-body = "0.4.3" +http-body = "1.0.0-rc.2" serde = { version = "1.0", features = ["derive"] } thiserror = "1.0.29" tokio = { version = "1.0", features = ["full"] }