Skip to content

Conversation

chriso
Copy link
Contributor

@chriso chriso commented Apr 9, 2024

Coroutine state is currently pickled twice, here and here. This PR fixes the issue by requiring that coroutine state is bytes when it reaches the latter. This allows the bundled scheduler to be responsible for serializing the state, where it can check that the state is valid and raise an IncompatibleStateError otherwise.

@chriso chriso self-assigned this Apr 9, 2024
Copy link
Contributor

@achille-roussel achille-roussel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the increased type safety 🙌

@chriso chriso merged commit 54c509e into main Apr 9, 2024
@chriso chriso deleted the no-double-pickle branch April 9, 2024 23:19
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.

2 participants