Merge lp:~leonardr/lazr.restful/bump-version into lp:lazr.restful
| Status: | Merged |
|---|---|
| Merged at revision: | not available |
| Proposed branch: | lp:~leonardr/lazr.restful/bump-version |
| Merge into: | lp:lazr.restful |
| Diff against target: |
193 lines (+113/-14) 6 files modified
src/lazr/restful/NEWS.txt (+9/-8) src/lazr/restful/_resource.py (+27/-3) src/lazr/restful/example/multiversion/tests/introduction.txt (+2/-1) src/lazr/restful/example/multiversion/tests/wadl.txt (+67/-0) src/lazr/restful/tales.py (+7/-1) src/lazr/restful/version.txt (+1/-1) |
| To merge this branch: | bzr merge lp:~leonardr/lazr.restful/bump-version |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Michael Nelson (community) | code | 2010-02-11 | Approve on 2010-02-11 |
|
Review via email:
|
|||
| Leonard Richardson (leonardr) wrote : | # |
- 115. By Leonard Richardson on 2010-02-11
-
Added missing file.
| Michael Nelson (michael.nelson) wrote : | # |
Thanks for all the changes Leonard. IRC log below for the record (and sorry Bjorn if you read this - I normally put the quoted diff, but I had to rush to finish this one on time!)
17:02 < noodles775> leonardr: on line 45 of the MP diff, is this really the earliest version, or the earliest *active* version? (which
17:03 < leonardr> noodles775: inactive versions don't exist in the lazr.restful installation, only in peoples' memories, so the
17:03 < leonardr> i can change the wording
17:04 < noodles775> leonardr: in which case, why can len(config.
17:04 < leonardr> noodles775: it's kind of confusing but i don't want to change the interface becuase that'll cause backward
17:04 < leonardr> there are two fields in the interface
17:04 < leonardr> active_versions and latest_
17:05 < leonardr> active_versions is a list, the other is a stirng
17:05 < leonardr> lazr.restful serves web services for all of those strings
17:05 -!- danilos [~danilo@
17:05 < leonardr> so if active_versions is =['beta', '1.0'] and latest_
17:05 < leonardr> if active_versions is [] and latest_
17:05 < leonardr> though i don't recommend doing that
17:06 < noodles775> So if active_versions is =['beta', '1.0'] and latest_
17:06 < noodles775> leonardr: ^^
17:07 < leonardr> noodles775: i'm having trouble parsing that sentence, but i can tell you that in that case earliest_version is 'beta'
17:07 < leonardr> latest_
17:07 < noodles775> OK, as the code implies, I'm just confused by the names.
17:08 < leonardr> noodles775: i'm kind of leaning towards treating the last item in active_versions as latest_
17:08 < leonardr> but that would be a separate job
17:09 -!- salgado-lunch is now known as salgado
17:09 < noodles775> Right, that would make sense. (do you mind adding an XXX?)
17:09 < leonardr> sure
17:11 < noodles775> leonardr: just a style question, is the comment on the empty line 69 intentional?
17:11 < leonardr> yeah, it's like a para break. i don't know if we allow that though
17:12 < noodles775> Yeah, I think a blank line (without the comment) serves just as well, but if the style guide doesn't say either
17:12 < leonardr> style guide doesn't mention it
17:13 < leonardr> if i see a blank line i think the first comment was talking about the blank line and the second comment is different
17:13 < noodles775> leonardr: s/marker_
17:13 < noodles775> sure
17:19 -!- danilos [~danilo@

This branch adds multi-version tests for the WADL generation. When I tried to give multi-version features to lazr.restfulclient, it didn't work because the WADL was malformed. The two main problems were:
1. Unless you got the WADL for the latest version, lazr.restful saw multiple registrations for an entry adapter and crashed. This is because lazr.restful was looking for registrations that matched the marker interface (let's say) IWebServiceVers ion1_0. But IWebServiceVers ion2_0 and IWebServiceVers ion3_0 subclass IWebServiceVers ion1_0, so the entry adpater registrations for those versions were picked up as well.
2. The stub function that signals the removal of a named operation as of a particular version was being treated as a (malformed) named operation in its own right.
I fixed these problems in ways that should make sense when you look at the code.
This branch also fixes a test failure and prepares a new release of lazr.restful. (I thought that would be the only purpose of this branch, until lazr.restfulclient started failing on me.)