You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by GitBox <gi...@apache.org> on 2026/02/26 20:02:13 UTC
[GH] (tvm-ffi/main-staged): Workflow run "CI" is working again!
The GitHub Actions job "CI" on tvm-ffi.git/main-staged has succeeded.
Run started by GitHub user junrushao (triggered by junrushao).
Head commit for run:
4dc71ed09c24ea3ae0273ddce31db587a0698bd6 / Junru Shao <ju...@gmail.com>
refactor(python)!: consolidate repr, add repr flag, and make eq opt-in in c_class (#40)
## Summary
- Consolidate `__object_repr__` into a public `object_repr()` function that uses `_ffi_api.ReprPrint` directly, replacing the hand-rolled lazy-caching pattern with `_get_global_func`.
- `CObject.__repr__` now delegates to `object_repr(self)` — single source of truth for repr logic.
- Remove four redundant `__repr__` overrides from `Array`, `List`, `Map`, `Dict` in `container.py` that duplicated inherited `CObject.__repr__`.
- Add `repr=True` flag to `@c_class`: when enabled (default) and no explicit `__repr__` exists, installs `object_repr` directly on the class.
- Remove parameter defaults from `_install_dataclass_dunders` (callers must be explicit).
- **Breaking**: Change `c_class` `eq` default from `True` to `False` — structural equality is now opt-in. Updated `_TestCxxClassDerived` to pass `eq=True` explicitly.
## Test plan
- [x] `uv run pytest -vvs tests/python -x` — 993 passed, 14 skipped, 1 xfailed
- [ ] Verify `repr=False` disables repr installation (not covered by existing tests; low risk)
Report URL: https://github.com/apache/tvm-ffi/actions/runs/22458584469
With regards,
GitHub Actions via GitBox
---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org