Skip to content

Commit

Permalink
feature gate deprecated APIs for marshal
Browse files Browse the repository at this point in the history
  • Loading branch information
Icxolu committed May 3, 2024
1 parent 7cbb854 commit 7cf6fc8
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/marshal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ use std::os::raw::c_int;
pub const VERSION: i32 = 4;

/// Deprecated form of [`dumps_bound`]
#[cfg_attr(
not(feature = "gil-refs"),
deprecated(
since = "0.21.0",
note = "`dumps` will be replaced by `dumps_bound` in a future PyO3 version"
)
#[cfg(feature = "gil-refs")]
#[deprecated(
since = "0.21.0",
note = "`dumps` will be replaced by `dumps_bound` in a future PyO3 version"
)]
pub fn dumps<'py>(
py: Python<'py>,
Expand Down Expand Up @@ -61,12 +59,10 @@ pub fn dumps_bound<'py>(
}

/// Deprecated form of [`loads_bound`]
#[cfg_attr(
not(feature = "gil-refs"),
deprecated(
since = "0.21.0",
note = "`loads` will be replaced by `loads_bound` in a future PyO3 version"
)
#[cfg(feature = "gil-refs")]
#[deprecated(
since = "0.21.0",
note = "`loads` will be replaced by `loads_bound` in a future PyO3 version"
)]
pub fn loads<'py, B>(py: Python<'py>, data: &B) -> PyResult<&'py PyAny>
where
Expand Down

0 comments on commit 7cf6fc8

Please sign in to comment.