Skip to content

Fix: Use default_factory for metadata in Message#9

Open
aleLoPrete wants to merge 2 commits intogh0st42:masterfrom
aleLoPrete:master
Open

Fix: Use default_factory for metadata in Message#9
aleLoPrete wants to merge 2 commits intogh0st42:masterfrom
aleLoPrete:master

Conversation

@aleLoPrete
Copy link
Copy Markdown

  • Bug: Message dataclass was using a mutable default value for the metadata field, preventing the spray-and-wait router from adding messages correctly:

    • ValueError: mutable default <class 'dict'> for field metadata is not allowed: use default_factory
  • Fix: The metadata field now uses default_factory=dict to ensure each Message instance receives its own independent dictionary.

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