Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions iotlabcli/associations.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ def _value(self):
def _sort(self):
"""Sort values with key."""
self._value().sort(key=self.VALUE_SORT_KEY)
# Sync C-level dict storage so CPython's json C encoder (which uses
# PyDict_GET_SIZE bypassing __len__) sees the correct data (Python>=3.12)
dict.clear(self)
dict.update(self, self.__dict__)

# Get actual attributes name

Expand Down
Loading