Skip to content
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

Throw TypeError when json-serializing invalid types #9789

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

jepler
Copy link
Member

@jepler jepler commented Nov 4, 2024

To do this without spending a lot of code, a new type flag is used for this.

This behavior is in line with standard Python.

Closes: #9768

This behavior is in line with standard Python

Closes: adafruit#9768
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

This is exactly what I had in mind from #9768, but I hadn't checked whether we had room. Thank you for doing this quickly!

@dhalbert dhalbert merged commit 973f597 into adafruit:main Nov 4, 2024
562 checks passed
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.

Invalid output from json.dump/dumps with IPV4Address
2 participants