Skip to content
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

Fix python fields #86

Merged
merged 2 commits into from
Nov 21, 2022
Merged

Fix python fields #86

merged 2 commits into from
Nov 21, 2022

Conversation

arvidn
Copy link
Contributor

@arvidn arvidn commented Nov 18, 2022

it appears the pyo3() macro does not play well with cfg_attr(), and these members failed to be exported (and there was no test for it.

This patch adds the test and works-around the issue by generating the #[getter] functions as part of the PyStreamable macro instead of relying on pyo3(get). This has the additional benefit to add less clutter to our class definitions.

@arvidn arvidn marked this pull request as ready for review November 19, 2022 10:53
chia_py_streamable_macro/src/lib.rs Show resolved Hide resolved
@arvidn arvidn merged commit 97d7c6f into main Nov 21, 2022
@arvidn arvidn deleted the fix-python-fields branch November 21, 2022 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants