Merge lp://qastaging/~wallyworld/launchpadlib/services-serviceroot into lp://qastaging/launchpadlib

Proposed by Ian Booth
Status: Rejected
Rejected by: Colin Watson
Proposed branch: lp://qastaging/~wallyworld/launchpadlib/services-serviceroot
Merge into: lp://qastaging/launchpadlib
Diff against target: 225 lines (+118/-4)
7 files modified
.bzrignore (+1/-0)
src/launchpadlib/NEWS.txt (+5/-0)
src/launchpadlib/__init__.py (+1/-1)
src/launchpadlib/docs/toplevel.txt (+8/-0)
src/launchpadlib/launchpad.py (+14/-1)
src/launchpadlib/testing/testing-wadl.xml (+75/-0)
src/launchpadlib/testing/tests/test_launchpad.py (+14/-2)
To merge this branch: bzr merge lp://qastaging/~wallyworld/launchpadlib/services-serviceroot
Reviewer Review Type Date Requested Status
Robert Collins (community) Needs Fixing
Review via email: mp+101338@code.qastaging.launchpad.net

Commit message

Add top level services collection to enable easy access to named Launchpad services.

Description of the change

== Implementation ==

This branch adds a new top level 'services' collection, allowing easy access to named Launchpad services. A Launchpad service implements IService and is traversed to via +service/<name>

Using launchpadlib:

lp = Launchpad(...)
service = lp.services['myservice']
service.some_method()

Some drive-by lint was also done.

== Tests ==

Extend the testing-wadl.xml file and add a new test test_services_collection_get_service.
The test simply ensures the new ServiceSet class is properly setup allowing the services top level collection to be used to locate a service.

== Lint ==

Checking for conflicts and issues in changed files.

Linting changed files:
  .bzrignore
  src/launchpadlib/NEWS.txt
  src/launchpadlib/__init__.py
  src/launchpadlib/launchpad.py
  src/launchpadlib/docs/toplevel.txt
  src/launchpadlib/testing/testing-wadl.xml
  src/launchpadlib/testing/tests/test_launchpad.py

./src/launchpadlib/docs/toplevel.txt
     121: want exceeds 78 characters.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

This seems to special case all the services; if the bug about interface support in launchpadlib were fixed, it wouldn't need special casing. As it stands, this is adding code rather than maintaining LoC count, and doing so when a generic approach will be ~ the same size and much more powerful doesn't make sense.

review: Needs Fixing
Revision history for this message
Ian Booth (wallyworld) wrote :

I have now landed the fix for the relative url issue so that launchpadlib.load() works with relative URLs eg '+services/sharing'. If I understand the discussion on the list correctly, I think I am now in a position to be able to land this branch as is. Any library fixes for the pattern this branch re-uses can come later.

Revision history for this message
Colin Watson (cjwatson) wrote :

launchpadlib has moved to git (https://code.launchpad.net/launchpadlib/+git). Sorry for not reviewing this in a timely fashion; if this is still relevant, then please update your branch and re-propose it against the git repository.

Unmerged revisions

130. By Ian Booth

Lint

129. By Ian Booth

Add a test

128. By Ian Booth

Add new services top level collection

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches