Closed Bug 1505797 Opened 4 years ago Closed 4 years ago

get rid of socorro.lib.util.DotDict

Categories

(Socorro :: General, task, P2)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: willkg)

References

Details

Attachments

(1 file)

There are multiple implementations of a thing call DotDict in the Socorro codebase. One of them comes from configman. The other is a shorthand implementation in socorro.lib.util that extends dict to allow it to use dot notation.

The problem with the one in socorro.lib.util is that it breaks the contact for __getattr__ namely that it raises KeyError rather than AttributeError and that causes a bunch of problems in Python 3.

This bug covers either removing this second DotDict from the codebase or reimplementing it such that it abides by the contact for attributes.
Grabbing this to do now.
Assignee: nobody → willkg
Blocks: 1406703, 1505591
Status: NEW → ASSIGNED
Priority: -- → P2
Commits pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/f4211934926ef85a496cf4e295e5830e9efd3a99
fix bug 1505797: remove socorro's DotDict

This removes one of the DotDicts from the codebase. Now there's only the
configman DotDict.

One architectural change this required was in crashstorage. Previously,
save_raw_and_processed would take DotDicts for the raw_crash and
processed_crash. Now the processor converts the two crash structures
into dicts before calling save_raw_and_processed.

https://github.com/mozilla-services/socorro/commit/6fa5f10aa1a824bcbf1e7ce8a1ea11aedf023430
Merge pull request #4701 from willkg/1505797-dotdict

fix bug 1505797: remove socorro's DotDict
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.