diff --git a/src/types/capsule.rs b/src/types/capsule.rs index 12d2232c56c..5637f8b4919 100644 --- a/src/types/capsule.rs +++ b/src/types/capsule.rs @@ -385,7 +385,9 @@ impl PyCapsule { /// /// # Safety /// - /// It must be known that the capsule imported by `name` contains an item of type `T`. + /// - It must be known that the capsule imported by `name` contains an item of type `T`. + /// - The contents of the capsule must not be mutated by any third-party code while the reference is alive. + /// The python interpreter does _NOT_ provide any synchronization guarantees for capsules. pub unsafe fn import<'py, T>(py: Python<'py>, name: &CStr) -> PyResult<&'py T> { // SAFETY: `name` is a valid C string, thread is attached to the Python interpreter let ptr = unsafe { ffi::PyCapsule_Import(name.as_ptr(), false as c_int) };