@@ -66,12 +66,10 @@ pub unsafe trait PyTypeInfo: Sized + HasPyGilRef {
6666
6767 /// Returns the safe abstraction over the type object.
6868 #[ 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"
7573 ) ]
7674 fn type_object ( py : Python < ' _ > ) -> & PyType {
7775 // 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 {
10199
102100 /// Checks if `object` is an instance of this type or a subclass of this type.
103101 #[ 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"
110106 ) ]
111107 fn is_type_of ( object : & PyAny ) -> bool {
112108 Self :: is_type_of_bound ( & object. as_borrowed ( ) )
@@ -120,12 +116,10 @@ pub unsafe trait PyTypeInfo: Sized + HasPyGilRef {
120116
121117 /// Checks if `object` is an instance of this type.
122118 #[ 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"
129123 ) ]
130124 fn is_exact_type_of ( object : & PyAny ) -> bool {
131125 Self :: is_exact_type_of_bound ( & object. as_borrowed ( ) )
0 commit comments