Merge lp:~leonardr/lazr.restful/multiversion-destructors into lp:lazr.restful
Proposed by
Leonard Richardson
on 2010-02-04
| Status: | Merged |
|---|---|
| Merged at revision: | not available |
| Proposed branch: | lp:~leonardr/lazr.restful/multiversion-destructors |
| Merge into: | lp:lazr.restful |
| Diff against target: |
227 lines (+94/-29) 2 files modified
src/lazr/restful/declarations.py (+37/-23) src/lazr/restful/docs/webservice-declarations.txt (+57/-6) |
| To merge this branch: | bzr merge lp:~leonardr/lazr.restful/multiversion-destructors |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Paul Hummer (community) | code | 2010-02-04 | Approve on 2010-02-04 |
|
Review via email:
|
|||
To post a comment you must log in.
| Leonard Richardson (leonardr) wrote : | # |
| Paul Hummer (rockstar) wrote : | # |
Based on previous knowledge from reviewing the dependent branch, this branch is a bit easier to grok. Once again, your doctests make this patch easier to understand.
review:
Approve
(code)

This branch adds multi-version error checking for destructor methods. A destructor method cannot have any arguments that are not fixed to specific values. The previous code was not version-aware, so it was only checking for the most recent version of the web service. In this branch I check every version in which the destructor method is published.
I also defined a tiny helper method, _version_name, which takes care of this logic which I was putting all over the place when printing out error messages:
if version is None:
version = "(earliest version)"