File tree 1 file changed +8
-13
lines changed
1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -47,12 +47,10 @@ pyobject_native_type_core!(PyCapsule, pyobject_native_static_type_object!(ffi::P
47
47
48
48
impl PyCapsule {
49
49
/// Deprecated form of [`PyCapsule::new_bound`].
50
- #[ cfg_attr(
51
- not( feature = "gil-refs" ) ,
52
- deprecated(
53
- since = "0.21.0" ,
54
- note = "`PyCapsule::new` will be replaced by `PyCapsule::new_bound` in a future PyO3 version"
55
- )
50
+ #[ cfg( feature = "gil-refs" ) ]
51
+ #[ deprecated(
52
+ since = "0.21.0" ,
53
+ note = "`PyCapsule::new` will be replaced by `PyCapsule::new_bound` in a future PyO3 version"
56
54
) ]
57
55
pub fn new < T : ' static + Send + AssertNotZeroSized > (
58
56
py : Python < ' _ > ,
@@ -102,12 +100,10 @@ impl PyCapsule {
102
100
}
103
101
104
102
/// Deprecated form of [`PyCapsule::new_bound_with_destructor`].
105
- #[ cfg_attr(
106
- not( feature = "gil-refs" ) ,
107
- deprecated(
108
- since = "0.21.0" ,
109
- note = "`PyCapsule::new_with_destructor` will be replaced by `PyCapsule::new_bound_with_destructor` in a future PyO3 version"
110
- )
103
+ #[ cfg( feature = "gil-refs" ) ]
104
+ #[ deprecated(
105
+ since = "0.21.0" ,
106
+ note = "`PyCapsule::new_with_destructor` will be replaced by `PyCapsule::new_bound_with_destructor` in a future PyO3 version"
111
107
) ]
112
108
pub fn new_with_destructor <
113
109
T : ' static + Send + AssertNotZeroSized ,
@@ -441,7 +437,6 @@ fn name_ptr_ignore_error(slf: &Bound<'_, PyCapsule>) -> *const c_char {
441
437
}
442
438
443
439
#[ cfg( test) ]
444
- #[ cfg_attr( not( feature = "gil-refs" ) , allow( deprecated) ) ]
445
440
mod tests {
446
441
use libc:: c_void;
447
442
You can’t perform that action at this time.
0 commit comments