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

Trailling comma in deprecated merge #175

Closed
niklaskhf opened this issue Dec 13, 2022 · 3 comments · Fixed by #176
Closed

Trailling comma in deprecated merge #175

niklaskhf opened this issue Dec 13, 2022 · 3 comments · Fixed by #176
Assignees
Labels

Comments

@niklaskhf
Copy link

After upgrading to the latest version of dpath (from 2.0.6 to 2.1.2) I noticed that dpath.util.merge was no longer working as expected since it started returning a tuple instead of the expected dictionary.

After some debugging, I found that this function is now deprecated (moved to the top level). However, the deprecated function seems to contain a bug in the form of a trailing comma. The trailing comma causes the result to be a tuple, instead of a dictionary.
Example: db.util.merge({"key1": 1}, {"key2": 2}) -> ({"key1": 1, "key2": 2},) instead of the expected db.utilmerge({}, {}) -> {"key1": 1, "key2": 2}

@moomoohk moomoohk added the bug label Dec 13, 2022
@moomoohk moomoohk self-assigned this Dec 13, 2022
@moomoohk moomoohk linked a pull request Dec 13, 2022 that will close this issue
@moomoohk
Copy link
Collaborator

Sorry about that, no idea how that happened... Good catch :)

Please check the linked branch and confirm that the issue is resolved. Thanks.

@niklaskhf
Copy link
Author

Thanks for the quick response. Looks good to me 😄

@moomoohk
Copy link
Collaborator

Great, will merge. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants