diff --git a/Cargo.lock b/Cargo.lock index a284eb8cce3..9610316c746 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2521,7 +2521,7 @@ dependencies = [ [[package]] name = "libp2p-deflate" -version = "0.40.0" +version = "0.40.1" dependencies = [ "async-std", "flate2", diff --git a/Cargo.toml b/Cargo.toml index 4932efb58ee..75354b74596 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -77,7 +77,7 @@ libp2p-autonat = { version = "0.11.0", path = "protocols/autonat" } libp2p-connection-limits = { version = "0.2.1", path = "misc/connection-limits" } libp2p-core = { version = "0.40.1", path = "core" } libp2p-dcutr = { version = "0.10.0", path = "protocols/dcutr" } -libp2p-deflate = { version = "0.40.0", path = "transports/deflate" } +libp2p-deflate = { version = "0.40.1", path = "transports/deflate" } libp2p-dns = { version = "0.40.1", path = "transports/dns" } libp2p-floodsub = { version = "0.43.0", path = "protocols/floodsub" } libp2p-gossipsub = { version = "0.45.1", path = "protocols/gossipsub" } diff --git a/libp2p/src/lib.rs b/libp2p/src/lib.rs index 0d4ea730dc0..d1e151cc3c9 100644 --- a/libp2p/src/lib.rs +++ b/libp2p/src/lib.rs @@ -52,10 +52,15 @@ pub use libp2p_core as core; #[cfg(feature = "dcutr")] #[doc(inline)] pub use libp2p_dcutr as dcutr; + #[cfg(feature = "deflate")] #[cfg(not(target_arch = "wasm32"))] -#[doc(inline)] -pub use libp2p_deflate as deflate; +#[deprecated( + note = "Will be removed in the next release, see https://github.com/libp2p/rust-libp2p/issues/4522 for details." +)] +pub mod deflate { + pub use libp2p_deflate::*; +} #[cfg(feature = "dns")] #[cfg_attr(docsrs, doc(cfg(feature = "dns")))] #[cfg(not(target_arch = "wasm32"))] diff --git a/transports/deflate/CHANGELOG.md b/transports/deflate/CHANGELOG.md index f75a7bf2e73..bb1b85d64db 100644 --- a/transports/deflate/CHANGELOG.md +++ b/transports/deflate/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.40.1 - unreleased + +- Deprecate in preparation for removal from the workspace. + See [issue 4522](https://github.com/libp2p/rust-libp2p/issues/4522) for details. + See [PR 4540](https://github.com/libp2p/rust-libp2p/pull/4540). + ## 0.40.0 - Raise MSRV to 1.65. diff --git a/transports/deflate/Cargo.toml b/transports/deflate/Cargo.toml index 1d0963165f0..95f552f63c8 100644 --- a/transports/deflate/Cargo.toml +++ b/transports/deflate/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-deflate" edition = "2021" rust-version = { workspace = true } description = "Deflate encryption protocol for libp2p" -version = "0.40.0" +version = "0.40.1" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/transports/deflate/src/lib.rs b/transports/deflate/src/lib.rs index 0d83713888e..54367ff2bff 100644 --- a/transports/deflate/src/lib.rs +++ b/transports/deflate/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(deprecated)] // Copyright 2019 Parity Technologies (UK) Ltd. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -17,13 +18,15 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. - #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use futures::{prelude::*, ready}; use libp2p_core::{InboundUpgrade, OutboundUpgrade, UpgradeInfo}; use std::{io, iter, pin::Pin, task::Context, task::Poll}; +#[deprecated( + note = "Will be removed in the next release, see https://github.com/libp2p/rust-libp2p/issues/4522 for details." +)] #[derive(Debug, Copy, Clone)] pub struct DeflateConfig { compression: flate2::Compression, diff --git a/transports/deflate/tests/test.rs b/transports/deflate/tests/test.rs index 504888a7eca..4224dcf435b 100644 --- a/transports/deflate/tests/test.rs +++ b/transports/deflate/tests/test.rs @@ -1,3 +1,5 @@ +#![allow(deprecated)] + // Copyright 2019 Parity Technologies (UK) Ltd. // // Permission is hereby granted, free of charge, to any person obtaining a