junrushao opened a new pull request, #509:
URL: https://github.com/apache/tvm-ffi/pull/509
## Summary
- Rename the `structure=` parameter to `structural_eq=` in `@py_class()` and
`field()` to better convey that the parameter controls structural
equality/hashing behavior
- Update Cython layer (`type_info.pxi`) to read the new attribute name
- Update all tests and documentation to use the new parameter name
## Breaking Change
The `structure=` parameter on `@py_class()` and `field()` has been renamed
to `structural_eq=`.
**Migration**: replace all occurrences of `structure=` with `structural_eq=`
in your `@py_class()` and `field()` calls:
```python
# Before
@py_class(structure="tree")
class MyNode(Object):
span: Object = field(structure="ignore")
# After
@py_class(structural_eq="tree")
class MyNode(Object):
span: Object = field(structural_eq="ignore")
```
## Test plan
- [ ] `uv pip install --force-reinstall --verbose -e .` (full C++ rebuild
required)
- [ ] `uv run pytest -vvs tests/python/test_structural_py_class.py`
- [ ] Verify all pre-commit hooks pass (confirmed locally: all passed)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]