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

feat(python): support validation of dict subclasses #466

Merged
merged 1 commit into from Mar 22, 2024

Conversation

flbraun
Copy link

@flbraun flbraun commented Mar 21, 2024

Disclaimer: This is a low-confidence PR as I have zero experience with Rust and the pyo3 library. Feel free to be hard on me :)

Currently, attempting to validate an instance of a dict subclass will raise a ValueError. This should not be happening, since the instance is still dict. Achieve compatibility by checking the instance's inheritance tree, and treat the instance like a dict if that check passes.

Resolves #427

Currently, attemping to validate an instance of a dict subclass will raise a `ValueError`. This should not be happening, since the instance is still dict.
Achieve compatibility by checking the subclasses' inheritance tree, and treat the instance like a dict if that check passes.
@Stranger6667
Copy link
Owner

Thank you! It looks good to me, will check it in more details during the weekend

Copy link

codecov bot commented Mar 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.48%. Comparing base (9771bc2) to head (968e3d2).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #466   +/-   ##
=======================================
  Coverage   79.48%   79.48%           
=======================================
  Files          56       56           
  Lines        5122     5122           
=======================================
  Hits         4071     4071           
  Misses       1051     1051           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Stranger6667 Stranger6667 merged commit 829ca19 into Stranger6667:master Mar 22, 2024
30 of 31 checks passed
@Stranger6667
Copy link
Owner

Thank you so much! I'll issue a new release shortly

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.

[python] ValueError: Unsupported type: 'collections.OrderedDict'
2 participants