-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a License #1
Comments
I am willing to do that (I should have done it long ago), but I do not think you should use it. It relies on
While I personally use nightly features freely as this is a toy project and I don't mind it breaking on me, this is a pretty unstable feature. Certainly not something you should be using in production. To resolve your issue now, you can also define some getters and gate those behind a cfg. Something like this: #[cfg(feature = "pyo3")]
#[pymethods]
impl LocationConfig {
#[getter]
fn id(&self) -> PyResult<u32> {
Ok(self.id)
}
#[getter]
fn name(&self) -> PyResult<Option<String>> {
Ok(self.name.clone())
}
// etc..
} |
Done. |
Thanks for the feedback and adding the license, I hadn't realized that your solution still relied on nightly. I think I'll just still with |
Something like a |
Hello, do you think you could add a license because I want to use your proc macro for inserting
#[pyo3(get)]
into all class fields? I also need to hide the attribute under a feature by default and the bug is a big blocker. ThanksThe text was updated successfully, but these errors were encountered: