boto/boto3 — pull request #9 by danielgtaylor (2014-10-28 22:41:45+00:00)
Title: Add implicit reverse references.

This pull request adds support for resources to reference their parents,
for example:

```python
obj = s3.Object('boto3', 'sun.jpg')
print(obj.bucket.name)
```

This works by using the `subResources` feature of the resource JSON
description format. Since `Object` is listed as a child of `Bucket`
in the bucket's sub-resources, and we know the identifier mapping
from and object's `bucket_name` to a bucket's `name`, we can create
the reverse reference just like if an explicit `hasOne` was defined
in the JSON.

Additionally this fixes the SQS resource JSON to no longer explicitly
list the Message hasOne Queue relation, since the Queue has a Message
in its sub-resources.

Adds a test for the resource model as well as modifies the references
test to ensure both normal and reverse references become attributes
on the instantiated resource.

**Note**: this is not very efficient, but caching should fix that in the near
future. I'm open to suggestions to make it better.

cc: @jamesls, @kyleknap