Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add events property to boto3.session.Session #204

Merged
merged 1 commit into from
Aug 7, 2015

Conversation

kyleknap
Copy link
Member

@kyleknap kyleknap commented Aug 3, 2015

Before the only way to hook into the 'creating-client-class' and 'creating-resource-class' events was to first create a botocore session and pass that to the instantiation of the boto3.session.Session object and register using the botocore session. This gives users access to the event system through the boto3.session.Session object much like you have access to it via the client.meta.events property.

cc @jamesls @mtdowling @rayluo

Before the only way to hook into the creating-client-class and
creating-resource-class events was to first create a botocore session
and pass that to the instantiation of the boto3.session.Session
object and register using the botocore session. This gives users access
to the event system through the boto3.session.Session object much
like you have access to it via the client.meta.events property.
@kyleknap kyleknap added the pr/needs-review This PR needs a review from a member of the team. label Aug 5, 2015
@jamesls
Copy link
Member

jamesls commented Aug 6, 2015

Looks good, just wondering about the property name. I would expect something called events to return a list of events. What about event_emitter?

@kyleknap
Copy link
Member Author

kyleknap commented Aug 6, 2015

@jamesls I chose events to be consistent with the client's events attribute. I agree the event_emitter is much more explicit/clear and probably in hindsight we should have used that for the client. Would it make it confusing to call it events on the client but event_emitter on the session when they are the same thing?

@jamesls
Copy link
Member

jamesls commented Aug 7, 2015

Yeah that's too bad. Let's keep it with .events so we're at least consistent.

:shipit:

@mtdowling
Copy link
Contributor

Alternatively, we could add event_emitter to client and deprecate events.

@kyleknap
Copy link
Member Author

kyleknap commented Aug 7, 2015

We talked about this offline. We are going to stick with events. Merging.

kyleknap added a commit that referenced this pull request Aug 7, 2015
Add events property to boto3.session.Session
@kyleknap kyleknap merged commit 0578ec9 into boto:develop Aug 7, 2015
@kyleknap kyleknap deleted the session-register branch August 7, 2015 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/needs-review This PR needs a review from a member of the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants