Skip to content

Commit 1135935

Browse files
committed
pyo3-ffi: deprecate _PySet_NextEntry
1 parent f31617b commit 1135935

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

newsfragments/10489.changed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
Removed use of the CPython-internal `_PyUnicode_COMPACT_DATA` symbol from PyO3's FFI test suite.
2+
Deprecated `_PySet_NextEntry` in `pyo3-ffi`; it is a CPython-internal API with no stability guarantee.

pyo3-ffi/src/setobject.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ pub unsafe fn PySet_GET_SIZE(so: *mut PyObject) -> Py_ssize_t {
4242

4343
extern_libpython! {
4444
#[cfg(not(Py_LIMITED_API))]
45+
#[deprecated(note = "`_PySet_NextEntry` is a CPython-internal API with no stability guarantee; iterate sets using `PyObject_GetIter` / `PyIter_Next` instead")]
4546
#[cfg_attr(PyPy, link_name = "_PyPySet_NextEntry")]
4647
pub fn _PySet_NextEntry(
4748
set: *mut PyObject,

0 commit comments

Comments
 (0)