#[pyo3(from_py_with = "...")]
causes compilation error when used in methods with the #[setter]
attribute.
#3992
Labels
Bug Description
Using the
from_py_with
per-argument option inside a method with the#[setter]
attribute causes a compilation error despite working fine in constructors and other methods without the setter attribute. The following code reproduces the issue with the error:I've tested this in 0.20.3 and 0.21.0-beta.0 with the new
Bound
smart pointer.Steps to Reproduce
#[setter]
method with#[pyo3(from_py_with="..")]
for some argument that doesn't implementPyClass
(or run the example from the issue).Backtrace
No response
Your operating system and version
MacOS Sonoma (M1 Max)
Your Python version (
python --version
)N/A
Your Rust version (
rustc --version
)rustc 1.76.0 (07dca489a 2024-02-04)
Your PyO3 version
0.20.3 and 0.21-beta.0
How did you install python? Did you use a virtualenv?
I install python with pyenv, but this issue does not require a Python installation or virtual environment to reproduce.
Additional Info
No response
The text was updated successfully, but these errors were encountered: