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/04/24 15:10:51 UTC
[GH] (tvm-ffi/main): Workflow run "Publish wheel" failed!
The GitHub Actions job "Publish wheel" on tvm-ffi.git/main has failed.
Run started by GitHub user yongwww (triggered by yongwww).
Head commit for run:
96edb9a8fd0c474b311234b174719dda20230419 / Junru Shao <ju...@apache.org>
feat(enum): add payload enum compatibility behavior (#568)
TL;DR:
- Make `IntEnum` and `StrEnum` variants behave like their raw payloads
for common Python enum operations while preserving FFI singleton
identity through same_as.
Examples:
- `Priority.low.name == "low"` and `repr(Priority.low) ==
"Priority.low"`.
- `Priority.low == 10`, `str(Priority.low) == "10"`, and
`hash(Priority.low) == hash(10)`.
- `Priority(10).same_as(Priority.low)` and
`Priority("low").same_as(Priority.low)`.
- `Opcode("+").same_as(Opcode.add)` and
`Opcode("add").same_as(Opcode.add)`.
Details:
- Install payload-only instance dunders after `py_class`/`c_class`
generation so payload semantics override generated object defaults
without clobbering explicit user methods.
- Gate payload behavior on `__ffi_enum_payload_value_type__` so plain
Enum does not interpret arbitrary class-body values as public payloads.
- Keep single-argument member lookup in `_EnumMeta.__call__` for
existing variants, raw payloads, and names.
- Document why these methods are dynamically installed and what
identity/equality contract they preserve.
- Add enum tests covering `name`, `repr`, `str`, `equality`, `hashing`,
and construction from payload/name.
Report URL: https://github.com/apache/tvm-ffi/actions/runs/24895567086
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