Closed Wicpar closed 1 month ago
Thanks for the report. Can you please provide a more complete minimal reproduction? I cannot reproduce this locally.
Before i got there i found the issue:
#[cfg(feature = "gil-refs")]
is a feature requried on the current crate, not on the dependency.
However more importantly it is applied to the PyNativeType
but not to PyTypeInfo
which requires PyNativeType
.
Thanks for debugging, that makes a lot of sense. I think the fix is that we have to rework to have two copies of the macros, which have the cfg
applied to them rather than within their expansion.
Note also that you should probably aim to stop using the gil-refs
feature ASAP, as that will be removed entirely in PyO3 0.23.
Fixed in #4589 / to be released in 0.22.4
Bug Description
while migrating to pyo3 0.22.3 the declared exceptions were no longer compiling due to a missing trait bound
Steps to Reproduce
create_exception!(my_module, MyError, PyException, "Some description.");
Backtrace
Your operating system and version
Windows 10
Your Python version (
python --version
)3.12
Your Rust version (
rustc --version
)1.75
Your PyO3 version
0.22
How did you install python? Did you use a virtualenv?
python is not required to reproduce the issue
Additional Info
No response