@@ -66,12 +66,10 @@ pub unsafe trait PyTypeInfo: Sized + HasPyGilRef {
66
66
67
67
/// Returns the safe abstraction over the type object.
68
68
#[ inline]
69
- #[ cfg_attr(
70
- not( feature = "gil-refs" ) ,
71
- deprecated(
72
- since = "0.21.0" ,
73
- note = "`PyTypeInfo::type_object` will be replaced by `PyTypeInfo::type_object_bound` in a future PyO3 version"
74
- )
69
+ #[ cfg( feature = "gil-refs" ) ]
70
+ #[ deprecated(
71
+ since = "0.21.0" ,
72
+ note = "`PyTypeInfo::type_object` will be replaced by `PyTypeInfo::type_object_bound` in a future PyO3 version"
75
73
) ]
76
74
fn type_object ( py : Python < ' _ > ) -> & PyType {
77
75
// This isn't implemented in terms of `type_object_bound` because this just borrowed the
@@ -101,12 +99,10 @@ pub unsafe trait PyTypeInfo: Sized + HasPyGilRef {
101
99
102
100
/// Checks if `object` is an instance of this type or a subclass of this type.
103
101
#[ inline]
104
- #[ cfg_attr(
105
- not( feature = "gil-refs" ) ,
106
- deprecated(
107
- since = "0.21.0" ,
108
- note = "`PyTypeInfo::is_type_of` will be replaced by `PyTypeInfo::is_type_of_bound` in a future PyO3 version"
109
- )
102
+ #[ cfg( feature = "gil-refs" ) ]
103
+ #[ deprecated(
104
+ since = "0.21.0" ,
105
+ note = "`PyTypeInfo::is_type_of` will be replaced by `PyTypeInfo::is_type_of_bound` in a future PyO3 version"
110
106
) ]
111
107
fn is_type_of ( object : & PyAny ) -> bool {
112
108
Self :: is_type_of_bound ( & object. as_borrowed ( ) )
@@ -120,12 +116,10 @@ pub unsafe trait PyTypeInfo: Sized + HasPyGilRef {
120
116
121
117
/// Checks if `object` is an instance of this type.
122
118
#[ inline]
123
- #[ cfg_attr(
124
- not( feature = "gil-refs" ) ,
125
- deprecated(
126
- since = "0.21.0" ,
127
- note = "`PyTypeInfo::is_exact_type_of` will be replaced by `PyTypeInfo::is_exact_type_of_bound` in a future PyO3 version"
128
- )
119
+ #[ cfg( feature = "gil-refs" ) ]
120
+ #[ deprecated(
121
+ since = "0.21.0" ,
122
+ note = "`PyTypeInfo::is_exact_type_of` will be replaced by `PyTypeInfo::is_exact_type_of_bound` in a future PyO3 version"
129
123
) ]
130
124
fn is_exact_type_of ( object : & PyAny ) -> bool {
131
125
Self :: is_exact_type_of_bound ( & object. as_borrowed ( ) )
0 commit comments