Use Abstract Base Classes in RecordDict and MergeableList
Bug #678313 reported by
Eric Casteleijn
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
desktopcouch |
Fix Released
|
Medium
|
Eric Casteleijn | ||
desktopcouch (Ubuntu) |
Fix Released
|
Medium
|
Eric Casteleijn |
Bug Description
Now that we're on Python 2.6+ we can use Abstract Base Classes in RecordDict (which should behave like a dictionary, and hence should inherit from MutableMapping) and MergeableList (which should behave like a list and thus inherit from MutableSequence.) This will mean that:
1. We have to implement and test fewer methods, since the ABCs do that for us.
2. The assumption that they implement the whole interface are now assured by python itself.
Related branches
lp://staging/~thisfred/desktopcouch/a-b-c-1-2-3
- Vincenzo Di Somma (community): Approve
- Manuel de la Peña (community): Approve
-
Diff: 874 lines (+272/-298)6 files modifieddesktopcouch/records/doc/field_registry.txt (+2/-2)
desktopcouch/records/field_registry.py (+61/-18)
desktopcouch/records/record.py (+66/-142)
desktopcouch/records/server_base.py (+3/-2)
desktopcouch/records/tests/test_field_registry.py (+16/-13)
desktopcouch/records/tests/test_record.py (+124/-121)
Changed in desktopcouch: | |
status: | New → In Progress |
assignee: | nobody → Eric Casteleijn (thisfred) |
importance: | Undecided → Medium |
Changed in desktopcouch: | |
milestone: | none → 1.0 |
Changed in desktopcouch: | |
status: | In Progress → Fix Committed |
Changed in desktopcouch (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → In Progress |
status: | In Progress → Fix Committed |
assignee: | nobody → Eric Casteleijn (thisfred) |
milestone: | none → natty-alpha-1 |
status: | Fix Committed → In Progress |
Changed in desktopcouch (Ubuntu): | |
milestone: | natty-alpha-1 → natty-alpha-2 |
Changed in desktopcouch: | |
status: | Fix Committed → Fix Released |
Changed in desktopcouch (Ubuntu): | |
status: | In Progress → Fix Released |
To post a comment you must log in.