PyO3 / pyo3

Rust bindings for the Python interpreter
https://pyo3.rs
Other
11.44k stars 693 forks source link

improve deprecation message on implicit trailing optionals #4282

Closed davidhewitt closed 1 week ago

davidhewitt commented 1 week ago

Testing out 0.22 release branch in pydantic-core, I noticed that the error message here generates hints like

Add `#[pyo3(signature = (error_type, context=None)]` to this function to silence this warning

which is missing a closing ).

I also decided to split the message up into multiple lines.

... I'll merge this as a trivial adjustment and rebase the release on it.