Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(deflate): deprecate in preparation for removal #4540

Merged
merged 5 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.0", path = "transports/dns" }
libp2p-floodsub = { version = "0.43.0", path = "protocols/floodsub" }
libp2p-gossipsub = { version = "0.45.1", path = "protocols/gossipsub" }
Expand Down
9 changes: 7 additions & 2 deletions libp2p/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"))]
Expand Down
6 changes: 6 additions & 0 deletions transports/deflate/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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/pulls/4540).
thomaseizinger marked this conversation as resolved.
Show resolved Hide resolved

## 0.40.0

- Raise MSRV to 1.65.
Expand Down
2 changes: 1 addition & 1 deletion transports/deflate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <admin@parity.io>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand Down
5 changes: 4 additions & 1 deletion transports/deflate/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(deprecated)]
// Copyright 2019 Parity Technologies (UK) Ltd.
//
// Permission is hereby granted, free of charge, to any person obtaining a
Expand All @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions transports/deflate/tests/test.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)]

// Copyright 2019 Parity Technologies (UK) Ltd.
//
// Permission is hereby granted, free of charge, to any person obtaining a
Expand Down
Loading