Skip to content

Commit c33d330

Browse files
authored
deprecate PyFrozenSet::empty (#3851)
1 parent 1d8d81d commit c33d330

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/types/frozenset.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,13 @@ impl PyFrozenSet {
104104
}
105105

106106
/// Deprecated form of [`PyFrozenSet::empty_bound`].
107+
#[cfg_attr(
108+
not(feature = "gil-refs"),
109+
deprecated(
110+
since = "0.21.0",
111+
note = "`PyFrozenSet::empty` will be replaced by `PyFrozenSet::empty_bound` in a future PyO3 version"
112+
)
113+
)]
107114
pub fn empty(py: Python<'_>) -> PyResult<&'_ PyFrozenSet> {
108115
Self::empty_bound(py).map(Bound::into_gil_ref)
109116
}

0 commit comments

Comments
 (0)