Skip to content

Commit

Permalink
deprecate PyFrozenSet::empty (#3851)
Browse files Browse the repository at this point in the history
  • Loading branch information
Icxolu authored Feb 17, 2024
1 parent 1d8d81d commit c33d330
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/types/frozenset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ impl PyFrozenSet {
}

/// Deprecated form of [`PyFrozenSet::empty_bound`].
#[cfg_attr(
not(feature = "gil-refs"),
deprecated(
since = "0.21.0",
note = "`PyFrozenSet::empty` will be replaced by `PyFrozenSet::empty_bound` in a future PyO3 version"
)
)]
pub fn empty(py: Python<'_>) -> PyResult<&'_ PyFrozenSet> {
Self::empty_bound(py).map(Bound::into_gil_ref)
}
Expand Down

0 comments on commit c33d330

Please sign in to comment.