basho/riak-python-client — pull request #201 by shuhaowu (2013-02-13 06:33:01+00:00)
Title: Getting rid of RiakLink in favour of tuples

Please review this carefully! There are some potential issues that we
need to address. Before that, some points needs to be noted:

1. `RiakLink.get` was actually never tested in code.
2. The new interface should be easier to use in a lot of scenarios
where you are iterating through links (you can do
`for bucket, key, tag in obj.get_links()`), it maybe less clear than
a class. IMO this is not the case as a 3-item tuple is sufficient,
but if the `RiakLink.get` method is actually used a lot in the wild,
it might be benificial to include some sort of wrapper function.

A potential issue that I identified: I've noted that `client.index`
doesn't actually perform the Riak 2i operation as specified in the HTTP
and PBC protocal and does a map reduce operation instead. Right now an
index operation actually seems to return links, which seems weird (see
line 110 in riak/test/test_2i.py) as it seems like the Riak API just
returns keys and this is returning `(bucket, key, None)`