Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Trailling comma in deprecated merge #175

Closed
@niklaskhf

Description

@niklaskhf

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}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions