Skip to content

Conversation

@danielgtaylor
Copy link
Contributor

This fixes #57 by hydrating resources from a collection with a JMESPath
query that is at collection.resource.path instead of collection.path
in the resource model.

import boto3

for o in boto3.resource('s3').Bucket('boto3').objects.all():
    # `o.meta.data` is set now, so the following succeeds.
    print(o.size)

cc @jamesls @kyleknap

This fixes #57 by hydrating resources from a collection with a JMESPath
query that is at `collection.resource.path` instead of `collection.path`
in the resource model.

```python
import boto3

for o in boto3.resource('s3').Bucket('boto3').objects.all():
    # `o.meta.data` is set now, so the following succeeds.
    print(o.size)
```
@danielgtaylor danielgtaylor added the bug This issue is a confirmed bug. label Feb 9, 2015
@danielgtaylor danielgtaylor self-assigned this Feb 9, 2015
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling f4a2e72 on collection-path-fix into * on develop*.

@kyleknap
Copy link
Contributor

LGTM 🚢

danielgtaylor added a commit that referenced this pull request Feb 10, 2015
Fix collection resource hydration path.
@danielgtaylor danielgtaylor merged commit 28ae6a8 into develop Feb 10, 2015
@danielgtaylor danielgtaylor deleted the collection-path-fix branch February 10, 2015 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This issue is a confirmed bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

S3 object property "size" not available

3 participants