feature gate deprecated APIs for `PyBool` (#4159)
This commit is contained in:
parent
ef13bc66e9
commit
7263fa92ef
|
@ -16,12 +16,10 @@ pyobject_native_type!(PyBool, ffi::PyObject, pyobject_native_static_type_object!
|
||||||
|
|
||||||
impl PyBool {
|
impl PyBool {
|
||||||
/// Deprecated form of [`PyBool::new_bound`]
|
/// Deprecated form of [`PyBool::new_bound`]
|
||||||
#[cfg_attr(
|
#[cfg(feature = "gil-refs")]
|
||||||
not(feature = "gil-refs"),
|
#[deprecated(
|
||||||
deprecated(
|
since = "0.21.0",
|
||||||
since = "0.21.0",
|
note = "`PyBool::new` will be replaced by `PyBool::new_bound` in a future PyO3 version"
|
||||||
note = "`PyBool::new` will be replaced by `PyBool::new_bound` in a future PyO3 version"
|
|
||||||
)
|
|
||||||
)]
|
)]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn new(py: Python<'_>, val: bool) -> &PyBool {
|
pub fn new(py: Python<'_>, val: bool) -> &PyBool {
|
||||||
|
|
Loading…
Reference in New Issue