Skip to content

Fix call to get_declared_fields: pass dict_cls #2153

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 1 commit into from
Jul 20, 2023

Conversation

lafrech
Copy link
Member

@lafrech lafrech commented Jul 20, 2023

Fixes #2152.

Now that dicts are ordered, there is no point using an OrderedDict to store fields, so while working on #1896, I simplified the logic to always use a dict.

This screws up classes overriding get_declared_fields that still expect a dict class to be passed (#2152).

Step back and pass dict class again. (Keep default value in get_declared_fields implementation.)

Pass dict_cls even if a defaut was added to get_declared_fields, for
compatibility with classes overriding get_declared_fields with no
default value.
@lafrech lafrech merged commit fc65bc2 into dev Jul 20, 2023
@lafrech lafrech deleted the fix_call_to_get_declared_fields branch July 20, 2023 22:01
@Cheaterman
Copy link

Sorry for Hyrum's law 😁 thanks for fixing this!

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.

3.20.0 seems to break marshmallow_sqlalchemy
2 participants