Skip to content

python: Don't override message_schema for json schemas #271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 5, 2025

Conversation

gasmith
Copy link
Contributor

@gasmith gasmith commented Mar 5, 2025

I watched @amacneil today as he did this:

chan = Channel("topic", message_encoding="msgpack", schema={ ... })

That doesn't work as expected, because we automatically override the message_encoding to be json when you provide a schema that looks like a dict jsonschema. Which is a silly thing to do, in retrospect. The schema encoding does not imply a message encoding.

@gasmith gasmith self-assigned this Mar 5, 2025
@gasmith gasmith requested review from bryfox, eloff and amacneil March 5, 2025 04:34
@gasmith gasmith marked this pull request as ready for review March 5, 2025 04:34
@gasmith gasmith merged commit 1b2fd87 into main Mar 5, 2025
36 checks passed
@gasmith gasmith deleted the gasmith/py-msg-schema branch March 5, 2025 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants