feature gate deprecated APIs for PyErr and exceptions#4136
Conversation
| } | ||
|
|
||
| #[test] | ||
| #[cfg(feature = "gil-refs")] |
There was a problem hiding this comment.
Is there a reason not to convert this test to use bound? It looks like into_ref() is the only deprecated piece here.
There was a problem hiding this comment.
This explicitly tests the std::error::Error impl, which the Bound api can't implement anymore.
There was a problem hiding this comment.
Hmm, do we need to be providing an impl of Error for Bound<'_, T>?
I think I missed this because this PR doesn't (yet?) but that impl behind a cfg, unless I really missed it.
There was a problem hiding this comment.
The Error impl does not exist anymore, because we can't implement source() anymore using the Bound API, see #3820 (comment). (It would also be problematic for user defined exceptions, because of orphan rules, but I think we could work around that using a marker trait and blanket impl if we wanted to)
Part of #3960
Move deprecated
PyErrand exception APIs behindgil-refsfeatures gate.