Skip to content

Conversation

@franzpoeschel
Copy link
Contributor

Follow-up to #1154.

In the Python API, it was so far impossible to actually get a handle to a scalar record component due to the reference return type of __getitem__. Python was smart enough to find out the actual type of the reference: the scalar record component IS its containing Record.
This can lead to problems such as infinite recursion when traversing over the object model in our Python API.

This additionally meant that no one ever noticed that I forgot handling scalar record components in #1154 for Python pickling, since those objects were impossible to obtain in Python. This adds the missing logic.

@franzpoeschel franzpoeschel force-pushed the fix-python-container-and-pickle-api branch from 4ae7a3f to f72e899 Compare June 7, 2024 12:43
@franzpoeschel franzpoeschel requested a review from ax3l June 10, 2024 09:12
@ax3l ax3l self-assigned this Jun 11, 2024
@ax3l ax3l merged commit 87cdc96 into openPMD:dev Jun 11, 2024
@ax3l ax3l added this to the 0.16.0 milestone Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants