You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "med9110 (via GitHub)" <gi...@apache.org> on 2026/10/08 11:18:09 UTC

[PR] Avro: Replace manual slots with dataclass slots [iceberg-python]

med9110 opened a new pull request, #4091:
URL: https://github.com/apache/iceberg-python/pull/4091

   ## Rationale for this change
   
   Refactor `ListReader` and `MapReader` to use `@dataclass(slots=True)` instead of manually declaring `__slots__`, as requested in #4086.
   
   The changes:
   
   - Replace manual slot declarations with `slots=True`.
   - Use two-argument `super()` for compatibility with slotted dataclasses.
   - Preserve the existing dataclass fields and reader initialization logic.
   
   **Implementation note:** Internal cached attributes now use the inherited instance dictionary instead of dedicated slots. This preserves the original dataclass field definitions and conditional attribute initialization, although the instance storage layout changes.
   
   Closes #4086
   
   ## Are these changes tested?
   
   Yes. All existing tests and applicable pre-commit checks passed.
   
   - `make test`: 4,253 passed, 5 skipped, 126 deselected.
   - `uv run pytest tests/avro -q`: 166 passed.
   - Pre-commit checks: Ruff, Ruff format, mypy, pydocstyle, codespell, and other applicable checks passed.
   
   No new tests were added for this refactor.
   
   ## Are there any user-facing changes?
   
   No user-facing behavior changes are intended. The internal instance attribute storage layout changes as noted above.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Avro: Replace manual slots with dataclass slots [iceberg-python]

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko merged PR #4091:
URL: https://github.com/apache/iceberg-python/pull/4091


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org