From 29c08226bd2600e7a86b16e0bab9392356fa95be Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Tue, 11 Feb 2025 16:28:37 -0700 Subject: [PATCH] http -> gel-http --- Cargo.lock | 58 +++++++++++++-------------- Cargo.toml | 4 +- edb/server/_rust_native/Cargo.toml | 2 +- edb/server/_rust_native/src/lib.rs | 2 +- rust/{http => gel-http}/Cargo.toml | 2 +- rust/{http => gel-http}/src/cache.rs | 0 rust/{http => gel-http}/src/lib.rs | 0 rust/{http => gel-http}/src/python.rs | 2 +- 8 files changed, 35 insertions(+), 35 deletions(-) rename rust/{http => gel-http}/Cargo.toml (98%) rename rust/{http => gel-http}/src/cache.rs (100%) rename rust/{http => gel-http}/src/lib.rs (100%) rename rust/{http => gel-http}/src/python.rs (99%) diff --git a/Cargo.lock b/Cargo.lock index 04c612812eeb..22fc4aadafef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1114,6 +1114,25 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "gel-http" +version = "0.1.0" +dependencies = [ + "eventsource-stream", + "futures", + "http", + "http-body-util", + "http-cache-semantics", + "lru 0.13.0", + "pyo3", + "pyo3_util", + "reqwest", + "rstest 0.23.0", + "scopeguard", + "tokio", + "tracing", +] + [[package]] name = "gel-jwt" version = "0.1.0" @@ -1268,7 +1287,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.1.0", + "http", "indexmap", "slab", "tokio", @@ -1379,25 +1398,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "http" -version = "0.1.0" -dependencies = [ - "eventsource-stream", - "futures", - "http 1.1.0", - "http-body-util", - "http-cache-semantics", - "lru 0.13.0", - "pyo3", - "pyo3_util", - "reqwest", - "rstest 0.23.0", - "scopeguard", - "tokio", - "tracing", -] - [[package]] name = "http" version = "1.1.0" @@ -1416,7 +1416,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.1.0", + "http", ] [[package]] @@ -1427,7 +1427,7 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", - "http 1.1.0", + "http", "http-body", "pin-project-lite", ] @@ -1438,7 +1438,7 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92baf25cf0b8c9246baecf3a444546360a97b569168fdf92563ee6a47829920c" dependencies = [ - "http 1.1.0", + "http", "http-serde", "serde", "time", @@ -1450,7 +1450,7 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f056c8559e3757392c8d091e796416e4649d8e49e88b8d76df6c002f05027fd" dependencies = [ - "http 1.1.0", + "http", "serde", ] @@ -1470,7 +1470,7 @@ dependencies = [ "futures-channel", "futures-util", "h2", - "http 1.1.0", + "http", "http-body", "httparse", "itoa", @@ -1487,7 +1487,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", - "http 1.1.0", + "http", "hyper", "hyper-util", "rustls", @@ -1507,7 +1507,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.1.0", + "http", "http-body", "hyper", "pin-project-lite", @@ -2724,7 +2724,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http 1.1.0", + "http", "http-body", "http-body-util", "hyper", @@ -2890,8 +2890,8 @@ version = "0.1.0" dependencies = [ "conn_pool", "gel-auth", + "gel-http", "gel-jwt", - "http 0.1.0", "pgrust", "pyo3", "pyo3_util", diff --git a/Cargo.toml b/Cargo.toml index 898a876a0338..4724060bc2de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,8 +11,8 @@ members = [ "rust/gel-auth", "rust/gel-jwt", "rust/gel-stream", + "rust/gel-http", "rust/pgrust", - "rust/http", "rust/pyo3_util", ] resolver = "2" @@ -30,7 +30,7 @@ db_proto = { path = "rust/db_proto" } captive_postgres = { path = "rust/captive_postgres" } conn_pool = { path = "rust/conn_pool" } pgrust = { path = "rust/pgrust" } -http = { path = "rust/http" } +gel-http = { path = "rust/gel-http" } pyo3_util = { path = "rust/pyo3_util" } [profile.release] diff --git a/edb/server/_rust_native/Cargo.toml b/edb/server/_rust_native/Cargo.toml index b526bfd6f387..f37912c7665d 100644 --- a/edb/server/_rust_native/Cargo.toml +++ b/edb/server/_rust_native/Cargo.toml @@ -16,7 +16,7 @@ pyo3 = { workspace = true } pyo3_util.workspace = true conn_pool = { workspace = true, features = [ "python_extension" ] } pgrust = { workspace = true, features = [ "python_extension" ] } -http = { workspace = true, features = [ "python_extension" ] } +gel-http = { workspace = true, features = [ "python_extension" ] } gel-auth = { workspace = true, features = [ "python_extension" ] } gel-jwt = { workspace = true, features = [ "python_extension" ] } diff --git a/edb/server/_rust_native/src/lib.rs b/edb/server/_rust_native/src/lib.rs index d0fcc95456a6..273bbe4bd396 100644 --- a/edb/server/_rust_native/src/lib.rs +++ b/edb/server/_rust_native/src/lib.rs @@ -33,7 +33,7 @@ fn _rust_native(py: Python, m: &Bound) -> PyResult<()> { add_child_module(py, m, "_conn_pool", conn_pool::python::_conn_pool)?; add_child_module(py, m, "_pg_rust", pgrust::python::_pg_rust)?; - add_child_module(py, m, "_http", http::python::_http)?; + add_child_module(py, m, "_http", gel_http::python::_gel_http)?; add_child_module(py, m, "_jwt", gel_jwt::python::_jwt)?; Ok(()) diff --git a/rust/http/Cargo.toml b/rust/gel-http/Cargo.toml similarity index 98% rename from rust/http/Cargo.toml rename to rust/gel-http/Cargo.toml index e0e369f439c9..2d3a87efeaf1 100644 --- a/rust/http/Cargo.toml +++ b/rust/gel-http/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "http" +name = "gel-http" version = "0.1.0" license = "MIT/Apache-2.0" authors = ["MagicStack Inc. "] diff --git a/rust/http/src/cache.rs b/rust/gel-http/src/cache.rs similarity index 100% rename from rust/http/src/cache.rs rename to rust/gel-http/src/cache.rs diff --git a/rust/http/src/lib.rs b/rust/gel-http/src/lib.rs similarity index 100% rename from rust/http/src/lib.rs rename to rust/gel-http/src/lib.rs diff --git a/rust/http/src/python.rs b/rust/gel-http/src/python.rs similarity index 99% rename from rust/http/src/python.rs rename to rust/gel-http/src/python.rs index 6894edc8cc28..184d3e6bd864 100644 --- a/rust/http/src/python.rs +++ b/rust/gel-http/src/python.rs @@ -740,7 +740,7 @@ impl Http { } #[pymodule] -pub fn _http(py: Python, m: &Bound) -> PyResult<()> { +pub fn _gel_http(py: Python, m: &Bound) -> PyResult<()> { m.add_class::()?; m.add("InternalError", py.get_type::())?;