Skip to content

Remove Category xdist serialization/deserialization#33

Merged
blake-r merged 1 commit intomainfrom
feature/remove-category-xdist-serialization
Aug 28, 2025
Merged

Remove Category xdist serialization/deserialization#33
blake-r merged 1 commit intomainfrom
feature/remove-category-xdist-serialization

Conversation

@blake-r
Copy link
Copy Markdown
Owner

@blake-r blake-r commented Aug 28, 2025

This PR removes the custom serialization (save) and deserialization (load) methods for the Category enum, as well as the StrEnum base class for Category. Instead, Category is redefined using a metaclass (CategoryMeta) to provide iteration capabilities while being fundamentally a plain string type.

The primary motivation is to simplify the data types used for communication between master and worker processes in xdist. The Category type is now represented as a simple str in type hints (CategoryT = str in typing.pyi), removing the need for explicit serialization steps when sending CategoryMeasurementsT dictionaries over the wire. The dump_measurements function now simply passes the dictionary through, and load_measurements uses the string keys directly as dictionary keys for the destination.

This change aims to make the xdist communication more robust and efficient by relying on native, serializable types.

@blake-r blake-r merged commit b8a4abc into main Aug 28, 2025
6 checks passed
@blake-r blake-r deleted the feature/remove-category-xdist-serialization branch August 28, 2025 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant