"Variant or associated item not found in Enum
" when a variant is disabled through a feature
#4411
Labels
Enum
" when a variant is disabled through a feature
#4411
Bug Description
When using Cargo features to conditionally enable
enum
variants,#[pyclass]
tries to wrap disabled variants, which causes the compilation to fail.Steps to Reproduce
Try to compile this code without enabling
optional_feature
:This fails with error:
(the code works fine when
optional_feature
is enabled)Backtrace
No response
Your operating system and version
Windows 10 & ArchLinux
Your Python version (
python --version
)Python 3.11.7
Your Rust version (
rustc --version
)rustc 1.80.0 (051478957 2024-07-21)
Your PyO3 version
0.20.3
How did you install python? Did you use a virtualenv?
Installer + virtualenv
Additional Info
No response
The text was updated successfully, but these errors were encountered: