Skip to content

Fix type_hooks handling for dictionary keys - #277

Open
NikitaTolpikin wants to merge 3 commits into
konradhalas:masterfrom
NikitaTolpikin:master
Open

NikitaTolpikin wants to merge 3 commits into
konradhalas:masterfrom
NikitaTolpikin:master

Conversation

@NikitaTolpikin

@NikitaTolpikin NikitaTolpikin commented Feb 4, 2025

Copy link
Copy Markdown

Hi!

Found a bug in your lib while migrating to a newer version. In version 1.6.0, type_hooks were applied to both dictionary keys and values. However, after upgrading to version 1.9.1, I noticed that type_hooks are no longer applied to dictionary keys, only to values.

This PR restores the previous behavior, ensuring that type_hooks are consistently applied to both dictionary keys and values, just like in version 1.6.0. This change should improve backward compatibility and maintain expected behavior for users relying on type_hooks.

Let me know if any adjustments or additional tests are needed!

Fixes #217 #252

@mciszczon

Copy link
Copy Markdown
Collaborator

@konradhalas Are you able to confirm this was an unintended change in behavior? Changelog does not mention it explicitly anywhere.

# Conflicts:
#	dacite/core.py
@NikitaTolpikin

Copy link
Copy Markdown
Author

@mciszczon @konradhalas Any updates?

This branch has not been deployed

No deployments
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.

Regression in handling type_hooks for dict keys between dacite version 1.7 and 1.8

2 participants