Skip to content

Conversation

@danielgtaylor
Copy link
Contributor

This changes the behavior of the meta object in a backward-incompatible
way. It goes from being a dict to an instance of a ResourceMeta class.
Example:

import boto3

s3 = boto3.resource('s3')

# The old way
s3.meta['service_name']
s3.meta['client']

# The new way
s3.meta.service_name
s3.meta.client

cc @jamesls, @kyleknap

This changes the behavior of the meta object in a **backward-incompatible**
way. It goes from being a dict to an instance of a `ResourceMeta` class.
Example:

```python
import boto3

s3 = boto3.resource('s3')

s3.meta['service_name']
s3.meta['client']

s3.meta.service_name
s3.meta.client
```
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) when pulling 9f3f4ec on meta-object into bc866bb on develop.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think stylistically we should always be using "is not None" if we are comparing against None, which in this scenario we are.

@jamesls
Copy link
Member

jamesls commented Dec 19, 2014

Looks good, just some small questions on the ResourceMeta class itself.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) when pulling c48ecc8 on meta-object into bc866bb on develop.

@jamesls
Copy link
Member

jamesls commented Dec 19, 2014

:shipit:

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) when pulling e31eba1 on meta-object into bc866bb on develop.

danielgtaylor added a commit that referenced this pull request Dec 19, 2014
Switch `resource.meta` to be an object.
@danielgtaylor danielgtaylor merged commit 59136a4 into develop Dec 19, 2014
@danielgtaylor danielgtaylor deleted the meta-object branch December 19, 2014 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants